{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "## 1.5 简单统计应用"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 1.生成正态分布数据"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.350225Z",
     "end_time": "2024-05-07T18:54:11.482918Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "array([-1.86487199e+00, -1.62057425e+00,  2.65704711e-01,  5.20845821e-01,\n       -1.15585580e+00,  6.61873867e-01, -1.82631128e+00,  3.33585745e-01,\n       -3.93743162e-02,  5.49721013e-01,  5.06614965e-01,  1.57892042e+00,\n        6.00183772e-01, -3.65971254e-01, -9.21141750e-01, -1.47649960e+00,\n        1.28932020e-01, -3.38729061e-02,  9.13885819e-01,  2.65579938e-01,\n        2.53924033e-01, -1.71843585e+00, -1.01431884e+00, -6.56322124e-01,\n        3.18375810e-01, -1.83767763e+00, -7.75066169e-01, -1.04354918e+00,\n       -8.66467617e-01,  7.14289527e-02,  3.16382160e-01, -6.85015838e-01,\n        3.17191903e-01,  9.23548902e-01, -2.12989426e-03, -5.43054292e-01,\n        1.30456626e+00, -2.31318345e+00,  2.25251988e-01,  7.08954691e-01,\n        1.12830868e-01, -3.41066465e-02, -9.23333972e-01, -9.13019730e-01,\n       -2.48797970e-01,  5.75542604e-02,  2.33903433e-01,  5.49214268e-01,\n        3.08386839e-01, -1.36795745e+00,  1.87953503e-02, -1.01437678e+00,\n       -1.13411237e+00, -1.75528825e+00,  2.45605949e+00,  9.02222370e-01,\n       -1.01651463e+00, -6.59636960e-01,  4.77177544e-01,  2.75924420e-01,\n       -9.53156423e-01, -1.62224611e-01, -6.63714129e-01, -1.00727502e+00,\n       -4.61337978e-01, -9.83708538e-01,  7.22143842e-01, -6.97650111e-01,\n       -3.00419508e-01,  7.09327078e-01, -6.70849805e-01, -8.89513552e-01,\n        7.81981013e-01,  1.49691579e+00,  1.84345236e-01,  1.05417073e-01,\n        1.28376137e+00, -1.03607226e+00, -2.02088511e+00,  9.18376141e-01,\n        1.60849067e+00,  1.01616086e-01, -5.17865593e-01,  5.75775526e-01,\n       -1.55284155e+00,  1.92510080e+00, -3.90172657e-01,  3.05710080e-01,\n       -7.54381572e-01,  1.45723826e+00,  1.12525205e+00,  9.44758995e-02,\n       -5.93005435e-01, -4.65414885e-01,  1.19305782e+00, -1.80163923e+00,\n       -2.90230088e-01, -1.76087609e+00, -7.41613540e-01,  1.27396780e+00,\n        5.94437141e-01,  1.37212386e+00, -2.84300255e-01,  4.56207819e-01,\n        1.44730531e+00, -9.68741189e-01,  1.92971228e+00,  1.59750305e+00,\n       -1.61978712e-01, -1.01478652e+00,  3.93147218e-01,  3.42206551e-03,\n       -1.47378793e-01, -1.38935184e-01, -1.50232205e+00,  3.17711694e-01,\n        1.77294362e-01,  3.06408903e-01,  5.07550261e-01, -1.16127182e+00,\n       -2.53204273e-01,  8.71209519e-01,  7.47562057e-01,  2.12695785e-01,\n       -1.06164309e+00, -1.44841823e-01, -1.06532602e-01, -5.72030821e-01,\n        8.30224524e-01,  1.81208978e+00,  9.85677672e-01,  4.20997662e-01,\n        7.73673361e-01, -9.96222290e-01, -7.93908330e-01, -1.39076405e+00,\n        1.96310487e-01, -7.01285335e-01,  1.30670427e+00, -1.12283618e+00,\n        1.61009516e+00,  3.89533749e-01,  6.25151336e-01,  7.32076192e-01,\n       -7.03333550e-01,  2.95738228e-01, -1.91141466e+00, -5.58569326e-01,\n        2.15512388e-01,  6.88355256e-01,  1.77515001e-01,  3.57412227e-01,\n        7.82082366e-01,  6.28937846e-01, -1.20829105e+00, -1.22512951e+00,\n        2.95812125e-01,  3.40143888e-02,  1.69253269e-02,  8.83373949e-02,\n        1.94611275e+00, -7.98514097e-01,  3.46918010e-01,  6.44740524e-01,\n       -2.86727292e-01, -5.90716422e-01,  1.55995735e-01,  6.33887099e-01,\n       -4.14430827e-01, -7.68513435e-01, -2.33067980e+00, -6.49707530e-01,\n        1.01160124e+00, -5.00924263e-02, -4.38511865e-01,  1.75636257e+00,\n       -2.09900032e-01,  3.15857881e+00, -5.21305121e-01, -1.29194016e+00,\n        4.55348133e-01, -3.93116359e-02,  2.19066991e-01,  4.73315879e-01,\n       -9.68988379e-01, -1.00202250e+00, -8.97524979e-02,  7.77281150e-01,\n        5.81394285e-01,  1.52379595e+00,  6.34269661e-01,  9.67588126e-02,\n        6.63890854e-01, -3.22448457e-01, -5.51762490e-01, -4.93812114e-01,\n        1.09071185e+00, -3.88672037e-01, -2.56482696e-01,  3.30599552e+00,\n       -9.95839099e-01,  1.41158991e+00, -1.48708870e-01, -1.28203658e+00,\n       -3.53249646e-01, -2.96921050e-01, -8.54087487e-01, -1.82779727e+00,\n       -2.83235068e-01, -1.77262779e+00,  1.29301746e+00,  1.29317475e-01,\n        1.14350639e+00, -2.32374681e-01, -6.94635599e-01,  2.67177467e-01,\n       -3.59888030e-01, -3.87272051e-01,  9.09729966e-01, -2.10618022e-01,\n       -5.38027712e-01,  9.43339241e-01,  2.74985496e-01,  3.55805277e-01,\n        2.17811075e-01,  3.03665194e-01,  8.82250837e-01, -1.32548334e+00,\n       -5.13852086e-01,  7.66554510e-02, -1.17266082e+00, -1.68560778e-01,\n        1.15965384e+00,  7.73947873e-01, -1.26974694e+00, -1.66238466e+00,\n        1.81608634e-01, -2.11307504e+00,  1.26794295e+00,  1.49052513e+00,\n       -7.34265892e-01, -1.34994220e+00, -3.84750706e-01, -2.04979269e+00,\n       -4.12358421e-02, -1.28573710e+00, -1.45780793e+00, -3.66100200e-01,\n        1.53400487e-01, -1.20983611e+00, -6.37473773e-01, -7.18462086e-01,\n        2.30006237e+00, -1.56142510e-01, -6.29141144e-01,  3.03660226e-01,\n        1.49252178e-01,  9.43480044e-01,  1.62682808e+00, -5.80853178e-01,\n        1.51483439e+00, -1.12381999e+00,  9.21163129e-01,  9.68381610e-01,\n        3.68467175e-01, -8.44028810e-01, -1.20140838e+00, -4.47956142e-01,\n        8.38087998e-01, -5.07114906e-01, -4.46527456e-01, -5.26180878e-02,\n       -9.84548337e-01, -4.92016718e-01, -7.69263272e-02, -9.84305107e-01,\n       -1.78127430e+00, -1.16269417e+00,  6.53029107e-01,  9.98026274e-02,\n       -6.97183676e-01, -1.78989498e-01, -7.69286604e-01, -5.74687040e-01,\n       -2.05399965e-02,  8.62947735e-02,  1.44787022e+00,  3.70871037e-01,\n       -5.10106413e-01, -6.43871135e-01,  9.93140195e-01, -1.72581459e+00,\n       -2.51713294e-01,  6.88668433e-01, -2.15339784e+00,  1.99535024e-01,\n       -1.03138811e+00, -1.69100530e-02, -6.47202384e-01,  6.55438916e-01,\n        5.83251428e-01,  2.56027193e-01, -2.04666208e+00, -3.51269510e-01,\n        4.71023594e-01,  4.90543141e-01,  1.58093034e+00, -5.57642494e-01,\n       -2.81075692e-01, -3.35015248e-01, -1.16981297e+00, -9.08680312e-01,\n       -2.71037552e-01,  9.45045010e-01, -1.36004232e-01,  9.50223660e-01,\n        1.60945283e+00,  1.17248290e+00,  6.02536080e-01, -1.69344680e+00,\n        2.59655464e-01, -8.66666610e-01, -6.92421716e-01,  2.34037329e+00,\n        1.26771119e-02, -8.08424702e-01,  2.23467475e-01, -3.06132694e-01,\n        9.21257413e-01, -2.09164083e+00,  5.74665871e-01,  2.19076024e-01,\n       -1.28036268e+00, -6.79306343e-01,  1.99096245e-01,  3.98543397e-01,\n       -9.17536556e-01,  9.54497147e-01, -8.98198611e-01,  2.34480944e-01,\n        1.16996567e+00,  1.09641809e+00,  9.18739100e-01,  1.00393902e-01,\n       -3.00166644e-01, -9.28014846e-01,  8.44016064e-01,  1.43546333e+00,\n        2.19080470e-01,  3.61859105e-01, -2.13773420e-01,  5.43012440e-01,\n       -5.34613803e-01,  1.87208843e+00, -6.08642050e-01, -8.18391170e-01,\n       -5.82962407e-01,  8.00590759e-01, -1.87727995e-01, -1.10919341e-02,\n        1.03676942e+00, -1.51075867e+00, -1.04252389e+00,  7.62331675e-02,\n        1.34255209e+00, -1.84704597e-01, -4.03056181e-01, -1.23423273e+00,\n       -1.25386608e+00,  3.32655007e-02,  6.02786688e-01,  1.65432823e-01,\n        4.15906825e-01,  2.35143130e-01,  2.88385232e-02,  9.98983360e-01,\n       -7.25967379e-01,  2.34943666e+00, -2.48728005e+00, -1.44749459e-01,\n        4.99110988e-01,  6.30565793e-02,  5.92097584e-01,  5.98545580e-01,\n       -5.83318856e-01, -2.83674491e-01,  1.49304276e+00, -4.48252166e-01,\n        1.80546920e+00,  1.29289061e+00,  3.69611673e-01, -8.33712948e-01,\n        1.22042124e+00,  1.68766194e+00,  1.60662388e+00,  7.75790000e-01,\n       -4.12082861e-01,  1.31696519e+00, -1.30103467e+00,  7.29584370e-01,\n       -2.06183432e-01, -1.21741611e+00,  1.36705392e+00, -6.24436065e-01,\n        1.18925575e+00, -2.57208060e-01,  1.20239635e+00, -6.34368091e-01,\n       -2.09136828e+00, -2.51613168e+00, -1.57693006e-01,  1.11100738e+00,\n        6.73581896e-01, -5.67861580e-02,  1.70825969e+00,  7.45097649e-01,\n        7.53348977e-02, -2.07705088e-01,  1.19001934e+00,  5.07915267e-01,\n       -6.67757588e-01,  1.23567893e+00, -1.78819659e-01,  1.84918353e-01,\n       -2.70589591e-01, -2.16797553e-02,  7.04702268e-01,  7.99350463e-01,\n        2.11665558e-01, -2.10019490e+00,  8.05939905e-02,  9.61364536e-01,\n       -3.51441625e-01, -7.05887630e-01,  1.26110773e+00,  3.87946856e-01,\n       -8.11249120e-01,  8.93916694e-01,  1.02540960e+00, -4.28768961e-01,\n        1.82511561e+00, -7.40903836e-01,  3.64105063e-02,  9.84821409e-01,\n       -4.09472059e-02, -7.07259758e-01, -6.71441481e-01,  5.73684068e-01,\n       -7.05763295e-02,  6.95398090e-01, -1.69014852e+00, -5.39675869e-01,\n        1.18782774e-01,  1.80158365e-02, -1.76883886e+00, -8.40979208e-01,\n        2.39371220e-01,  9.52085927e-01, -7.72094575e-01,  2.18097003e-01,\n       -7.17703909e-01, -1.28449964e+00,  1.45752744e-01, -5.55073110e-01,\n       -4.83118292e-02,  5.91367967e-01, -6.46539508e-01, -3.70176804e-01,\n        5.26986446e-01,  8.73473279e-02, -1.31823909e+00, -5.21467219e-01,\n        1.03764057e+00, -2.65980944e-01,  3.38001801e-01,  4.82733707e-01,\n       -8.57857495e-01, -2.70274692e-01, -4.58728464e-01, -2.52675092e-01,\n       -5.12149165e-01,  7.08217507e-02,  4.13626691e-01, -1.32242475e+00,\n        5.73680200e-01, -5.54753915e-01, -1.14870095e+00, -6.66472013e-01,\n       -9.85812947e-01,  9.02733644e-02, -1.31969884e+00,  1.05774828e+00,\n        1.80218197e+00, -1.70042938e+00, -2.03282885e-01, -7.20987926e-01,\n       -8.06046050e-01,  1.31797840e+00,  2.52255111e-01,  1.40153862e+00,\n        1.00756248e+00,  1.18079142e-01, -3.10583779e-01, -1.11205396e+00,\n       -2.69400234e-01, -4.54766156e-02, -9.94080770e-01, -5.58258665e-01,\n        1.19909453e+00, -2.45648678e-01,  1.45186185e+00, -6.73236973e-01,\n        1.19339552e-01,  1.10311028e+00, -5.22094926e-01, -1.39077966e-01,\n        5.51406465e-01,  1.33036727e+00, -9.26333987e-01, -1.67339226e+00,\n       -1.98051302e+00,  2.46092425e+00, -3.94501354e-01,  6.97407649e-01,\n       -6.08233509e-01, -1.01110982e+00,  3.72780427e-01, -1.94887270e-01,\n        8.09021979e-01,  1.47130639e-01, -9.95716717e-01, -1.62735395e+00,\n        2.22110366e-01,  5.25335993e-01, -7.08012688e-01, -2.12655075e+00,\n        1.98954146e+00,  5.82880579e-01, -7.60444698e-01, -7.38227966e-01,\n        3.75683261e-01,  7.67298861e-01,  3.30865656e-01,  1.08784688e+00,\n       -1.46973086e+00, -1.94048899e+00, -6.89019426e-01, -1.48383202e+00,\n        1.45008675e+00, -6.95687914e-01,  3.41630039e-01,  5.64023500e-01,\n        3.93099263e-01, -1.08912213e-01,  2.77768142e-01, -5.96313904e-01,\n        1.17724177e+00, -3.01084640e-01,  6.95033742e-01,  5.78152946e-01,\n       -1.68256688e-01,  9.46172227e-01, -9.19515114e-01, -7.75350682e-01,\n        8.92002525e-01,  4.23074985e-01, -4.90624668e-01, -4.23155729e-01,\n       -8.75539316e-02, -1.75479739e-01, -9.66642060e-01,  7.78068326e-01,\n        1.57070607e-01,  7.85317305e-01, -8.50027415e-01,  1.32285801e+00,\n        1.37126177e+00,  6.64188156e-01,  1.08281571e+00,  8.70587010e-01,\n       -9.12833193e-02,  4.70743523e-01, -4.64091072e-01, -4.68359027e-01,\n        1.27620161e+00,  9.33811427e-01,  5.96549477e-01, -5.63835697e-01,\n       -5.62319448e-01,  5.25949629e-01, -4.91291034e-01,  1.78829693e-01,\n       -1.10119432e+00,  1.35690632e-01, -8.31854637e-01, -1.16104541e+00,\n       -6.93692839e-02,  2.59327813e-01, -1.28616637e+00,  1.24543106e-01,\n        5.91237376e-02, -3.34884773e-01,  7.98341399e-01,  1.22339601e+00,\n        6.88154397e-01,  1.60286024e+00,  2.57909776e+00, -6.43287865e-01,\n        1.08759457e+00,  2.91441246e-01, -8.94466875e-01,  8.27130261e-01,\n        2.01163202e+00, -6.26969326e-03,  6.23383512e-02, -4.36337537e-02,\n        8.09054124e-01,  7.18212397e-01,  1.68778816e+00, -7.73326612e-01,\n        2.56901571e-01, -4.88224250e-01, -4.42008565e-01, -5.22684455e-01,\n        6.64619210e-02, -9.97344120e-01,  7.03996177e-01, -2.31411177e-01,\n       -1.29381649e+00,  5.36983197e-01,  3.50026194e-01, -4.06628872e-01,\n        3.91129209e-02,  3.51076070e-01,  1.31473587e+00, -5.79689793e-01,\n       -1.75867947e-02,  1.70120590e+00, -8.52926151e-01,  1.24041969e+00,\n        4.23223263e-01, -2.95532189e-01,  1.03944105e+00,  6.15316602e-02,\n       -1.13278198e+00, -8.68600909e-01, -1.03034013e+00,  2.95071825e-01,\n       -1.79048593e+00, -8.98227269e-01, -1.02515504e+00,  8.10355301e-01,\n       -8.36002379e-02,  1.63380676e+00, -1.40017520e+00,  1.26842617e+00,\n        1.01291722e+00, -7.39139023e-01,  1.36950366e+00,  8.08663965e-01,\n        6.91204765e-01,  3.36035963e-01, -1.27498335e+00, -1.32256736e+00,\n        7.13048177e-01,  1.28634798e+00, -1.13550001e+00, -1.27670692e+00,\n        3.21577810e-01, -1.17785615e+00, -5.15793038e-01,  9.88476980e-01,\n        1.74211126e+00, -9.22369874e-01, -1.57871856e+00, -1.11766187e+00,\n        7.38516589e-01, -6.44360593e-01, -1.86863533e-01,  7.22123122e-01,\n       -1.55095149e+00,  3.19856012e-01,  1.71873912e+00,  9.58353936e-01,\n        1.04574440e+00, -9.89387283e-01,  1.65225790e-01, -2.48710316e+00,\n       -6.56305713e-01, -1.62559630e+00,  1.20238144e+00, -8.15243170e-01,\n        7.75708643e-01, -1.02319602e-01, -3.01251820e-01,  8.61590989e-01,\n        4.57096473e-01,  2.15458238e-01,  8.86715226e-01,  1.89315818e+00,\n        3.35542962e-01, -2.80512978e+00,  6.03182431e-01,  6.07619110e-02,\n        1.98301166e-01, -1.01428698e+00,  9.63093502e-01, -8.07808693e-01,\n       -5.68589554e-01,  3.55263728e-01, -1.40916419e+00, -6.50605577e-01,\n       -1.09089305e-01,  1.85161755e+00,  7.13730933e-01,  6.30209693e-01,\n        5.06565398e-02,  3.60156377e-01, -2.79125462e+00,  8.91759548e-01,\n       -8.51210990e-01, -3.15581939e-01, -8.94007661e-01, -1.17336210e+00,\n        2.50853573e+00,  1.05638902e+00,  2.75099760e-02, -1.66438451e-01,\n       -9.37008751e-01, -1.97903493e-01, -1.39035589e+00, -6.63923589e-01,\n       -9.14787126e-01,  2.39006394e-01, -7.41696954e-01, -4.41802714e-01,\n        8.92495409e-01, -1.03569388e+00, -1.51572867e+00,  7.66468300e-01,\n        9.49103095e-01,  7.45164082e-01, -7.85526351e-01,  1.82800687e-01,\n       -1.31782076e+00, -1.57513313e+00,  1.36997308e+00,  1.61488430e+00,\n       -1.08224227e+00, -4.98855830e-02,  5.19527690e-01,  1.34587028e+00,\n       -1.17740095e-01, -1.49129015e+00,  7.15577532e-01,  5.69093396e-01,\n        9.64888864e-01, -2.59827424e+00,  6.01864241e-01,  5.95853457e-01,\n       -6.96991037e-01, -5.84020363e-02, -1.02429960e+00,  1.15731280e+00,\n        4.95301650e-01, -7.50267438e-01, -1.54711147e+00,  2.08256209e-02,\n        1.26970442e+00, -2.52822367e-01,  4.53769165e-01,  8.23805503e-01,\n        8.48382039e-01,  1.53280947e+00, -5.47935780e-01, -9.44751434e-01,\n       -1.57664403e+00,  2.34791249e+00, -9.29140845e-02, -1.35070546e+00,\n       -3.82656380e-01, -2.98204549e-01,  1.02704099e+00,  3.91357205e-01,\n       -3.52736753e-01, -5.68808239e-01, -1.07345275e+00, -1.72975200e-01,\n        8.95818886e-01,  5.69518982e-01,  5.25834482e-01, -9.83834878e-01,\n        1.73864591e+00, -9.82271670e-01,  3.76157650e-01,  2.59756710e-01,\n        4.72748469e-01,  8.70081123e-01,  6.20778755e-01,  7.42062500e-03,\n       -6.12771121e-01,  6.54644418e-01,  1.52350559e+00, -6.69931743e-01,\n       -1.36012414e+00,  2.33059182e-01, -9.25985421e-02, -2.02717649e+00,\n       -1.15815438e+00,  6.85630866e-01,  1.49779507e+00, -5.01888827e-01,\n       -1.15492049e+00, -5.04463910e-01,  1.06264007e+00,  1.71121796e-01,\n       -1.89528571e-02,  6.60963541e-01, -1.02806721e+00, -2.64662844e-01,\n        1.06557757e+00, -3.27292371e-01, -5.65349332e-01, -6.39638360e-01,\n       -1.83625892e-01,  9.24078690e-01, -7.70629648e-01,  1.83380312e+00,\n        1.15238636e+00,  1.30272954e+00, -6.16148310e-02,  4.03497151e-01,\n       -4.18795546e-01,  3.02749826e+00, -6.27783786e-01, -1.70712016e+00,\n        5.01133650e-01,  1.38739218e+00,  6.24122123e-01, -1.48272729e+00,\n        2.26415971e+00,  6.74129944e-01, -3.90091869e-01,  1.39469341e+00,\n       -1.62965966e-01,  1.40882311e+00,  4.72077503e-01,  2.11754785e-01,\n        6.10822424e-01, -1.09982308e+00, -1.19049282e-01, -5.53509843e-01,\n       -6.11286627e-01, -1.72213108e+00, -1.61621814e+00,  1.85516308e-01,\n       -1.82520485e+00,  9.17136094e-01,  2.02463589e-02, -6.39425127e-02,\n        8.06452688e-01,  1.20653370e+00,  8.56685040e-01, -5.20386175e-01,\n        4.13169621e-01,  1.17551228e+00, -3.30380163e-01, -1.21597494e+00,\n       -9.88242587e-01, -4.03791095e-01, -2.58524000e-01, -2.59937768e+00,\n       -4.79714124e-01,  6.25312647e-02, -1.60367690e-01,  8.60986141e-01,\n        1.98307308e-01, -6.26638329e-01,  4.50129917e-01, -1.15181210e+00,\n        4.02296158e-01, -5.41901485e-01,  3.78003934e-01,  2.81679252e+00,\n       -5.70210093e-01, -7.44917979e-01, -3.97099845e-01, -9.04068318e-01,\n       -2.01747567e+00,  3.65083163e-01, -1.44304833e+00, -2.75254752e-01,\n       -7.99356116e-01, -3.24558220e-01,  1.31631484e+00, -3.99181837e-02,\n       -1.24433894e-01,  1.63625170e+00,  1.79521360e-01, -2.77239325e+00,\n        1.46769469e+00,  1.01769201e+00,  4.70055358e-02,  1.19160040e+00,\n        4.40503666e-01, -7.81710829e-01, -1.69178636e-02, -1.23955553e+00,\n       -1.92062978e-02,  2.43746596e-01, -1.70467365e-01,  3.18414021e-01,\n       -4.55742332e-01,  7.52058474e-01,  3.06004511e-01, -7.81697564e-01,\n       -1.61075042e+00, -3.41994325e-01, -2.06122549e-01,  1.98804094e-01,\n       -1.89883874e+00,  1.16965320e+00, -3.34164422e-01,  3.81483090e-02,\n        3.88415313e-01,  1.04336633e+00,  1.27017072e+00,  5.47477224e-01,\n       -3.03800623e-02, -1.22104428e+00,  1.60262746e-01, -6.64118761e-01,\n       -1.66004106e+00, -1.19207635e+00, -1.48636893e+00,  7.50042036e-01,\n        2.70056560e+00,  4.40873745e-01,  1.65357749e-01, -8.64179320e-01,\n       -7.48675169e-02,  1.01784810e+00,  1.71880147e+00,  7.60599523e-02,\n       -1.11966497e+00,  6.00030033e-01, -2.91433919e-01, -3.44613734e-01,\n        2.09200455e+00, -2.01819270e+00,  1.29123662e+00, -1.37600757e+00,\n       -1.19000958e+00, -5.36340847e-01,  2.85580684e-01,  7.17980701e-01,\n        3.79218964e-01,  1.40100297e+00,  2.89672983e-01, -2.15726588e+00,\n        8.96663715e-01, -2.57643452e-01, -2.06737301e+00,  7.29128884e-01,\n       -2.20709986e-01,  4.20109809e-01, -7.01868614e-01,  5.38954565e-02,\n       -8.17869482e-01, -1.34819857e-01, -9.96166780e-01, -1.14920631e+00,\n       -6.58562583e-02, -1.67879112e+00,  5.18768037e-01,  1.59291447e-01,\n       -6.84587384e-01, -1.38668982e+00,  6.77528798e-01,  1.00750338e+00,\n       -2.89225741e-01, -4.56128729e-02,  5.49605689e-02, -7.03051801e-01,\n        6.93558078e-01, -9.69538057e-01,  1.18408828e+00,  1.07768707e+00,\n        1.59285823e-01,  8.05684818e-02, -1.59125521e-01, -1.31158830e+00,\n       -3.03922823e-01,  8.07794585e-01,  7.61268715e-01, -5.48879184e-01,\n       -3.15563487e-01,  1.29634067e+00, -1.03002412e+00, -9.90296195e-01])"
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "mu, sigma = 0.0, 1.0\n",
    "g = np.random.normal(loc=mu, scale=sigma, size=1000)\n",
    "g"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "data": {
      "text/plain": "array([ 1.77961240e+00,  1.07724174e+00, -1.10796085e+00,  1.64669731e+00,\n        1.15592750e-01, -1.67945895e-01,  2.65869638e-01,  8.92812627e-01,\n        2.87287829e-01,  1.10218412e+00,  4.07132882e-01, -9.79332633e-01,\n       -5.23106620e-01,  2.15471841e+00, -2.57134706e-01,  1.65610854e+00,\n       -1.01848781e+00,  2.85594282e-01,  9.50148084e-01,  4.24396573e-01,\n        6.36854112e-01, -3.62381754e-01, -7.58918027e-01, -1.17371374e+00,\n       -1.34218470e+00, -1.03286644e+00, -2.87223192e-02, -2.54260105e-01,\n        2.97621717e-01,  1.65374014e+00,  3.02994037e-01, -5.95415953e-01,\n        1.47873831e+00, -1.40894051e+00, -4.79057507e-02, -1.66344011e-01,\n       -8.75964477e-01, -7.30565222e-01, -7.13017306e-02,  1.81332762e+00,\n        5.10847137e-01,  1.53662581e+00,  1.59507884e+00, -1.53497723e+00,\n        9.67170454e-01,  1.59923279e-01, -1.01618756e+00, -1.23130767e+00,\n        2.71121914e+00,  2.88567510e-01, -1.22186143e+00, -7.81000011e-01,\n        1.57049261e+00, -3.61265766e-01,  7.86262588e-01,  8.91816509e-01,\n       -1.12152395e-01,  6.13379792e-01, -1.24587521e+00, -1.78130553e+00,\n       -8.55810382e-01, -4.49026087e-02, -5.38790086e-01, -2.27253961e-01,\n       -1.11193078e+00, -6.74120794e-02, -9.82753283e-01,  1.56867147e-01,\n       -8.92405490e-01, -3.25146255e-01, -3.27307183e+00,  6.38018902e-01,\n        2.29177398e-01,  3.76949919e-01, -2.33873806e-01, -1.65966538e+00,\n       -1.22645954e+00,  1.36686459e+00,  6.67240656e-01, -3.53239656e-01,\n       -5.91105055e-01, -3.48768549e-01, -4.21052027e-01, -6.76899210e-01,\n       -7.51605105e-01,  1.55836853e+00, -1.26055219e+00, -5.84328310e-01,\n       -1.03736683e+00, -2.85678143e-01, -7.99985726e-01,  6.22593762e-01,\n       -1.07209103e+00, -4.00960519e-01, -1.61263693e+00,  1.17991303e+00,\n        3.10679641e-03,  1.15175254e+00, -1.48588528e+00, -7.57104343e-01,\n       -1.15645196e+00, -1.89676043e+00,  1.14381673e+00, -7.53947946e-01,\n        3.01691212e-01,  3.37293655e-01,  6.84362209e-01,  8.48710348e-02,\n       -4.71522355e-01, -2.75000942e-01,  1.20240118e+00,  4.53361142e-01,\n       -1.00914568e+00,  3.23575274e-01,  1.09642835e-01, -1.35867401e+00,\n       -1.57203461e+00,  5.55424736e-01,  1.21647655e+00,  1.72293021e+00,\n        1.02048207e-01, -1.08420274e+00,  9.65535570e-01, -1.37785889e+00,\n       -1.69418329e-01,  8.54726807e-01, -1.62996419e-01, -2.93313228e-01,\n       -6.71571712e-01, -4.58759862e-01, -1.65215733e+00,  9.18018211e-01,\n       -1.51834406e+00, -1.01724931e+00, -3.29231306e-01, -3.30438980e-01,\n       -1.27262634e+00,  3.57931474e-01,  6.66332041e-01, -1.95834559e+00,\n        1.54733449e+00,  8.61410253e-01,  1.16162340e+00, -2.60313976e+00,\n       -1.93182457e+00,  1.75279443e-01, -4.14761309e-01, -2.33223660e-01,\n        3.02430198e-01,  3.53853625e-01, -5.63153152e-01,  2.37391387e-01,\n       -4.51724630e-01,  2.38688051e+00, -1.87476438e-01,  3.76773544e-01,\n       -6.55112496e-01, -6.46466886e-01,  2.19299354e+00,  6.84980390e-01,\n       -5.29705466e-01, -5.02007697e-01, -1.25183889e+00,  2.05114253e-01,\n        1.06536877e-01,  9.04630358e-01, -3.79636619e+00, -1.36917514e+00,\n        2.15301703e-01,  4.52873136e-01,  1.01242141e+00, -3.06885277e-02,\n        1.34346644e+00, -1.04900112e+00, -6.11553546e-01,  4.02009800e-01,\n        1.52922071e-01, -2.22981785e-01,  5.18669467e-01, -4.51402030e-01,\n       -9.93459472e-02,  3.40647602e+00, -1.09201518e+00,  3.76028049e-01,\n       -3.46112370e-02, -1.41507021e+00,  2.48275904e+00,  1.00293013e+00,\n        5.07520771e-02, -3.12337358e-01, -4.63083334e-01, -5.96163643e-01,\n        6.13513010e-01,  6.70785206e-01, -8.25213489e-01,  2.17529548e+00,\n       -3.95555866e-01,  8.28757866e-01, -9.43398764e-02, -9.71220090e-01,\n        1.76387414e-01,  8.08173223e-01, -1.91255184e-01,  6.13797649e-01,\n       -1.59869195e+00, -9.15215232e-01, -3.73086665e-01,  1.22300590e-01,\n        5.70726090e-01, -1.18545413e+00,  4.15957337e-01,  4.91594040e-01,\n        3.92127565e-01, -2.41799606e+00,  1.20850231e-01, -3.43312115e-01,\n       -4.48813162e-01, -7.35280788e-01, -6.42873171e-01, -9.87877332e-01,\n       -1.44161369e+00,  6.21802678e-01, -1.67647127e+00, -8.03517816e-01,\n       -9.61664588e-01, -9.86861121e-01, -2.07848926e-01,  1.56640762e-01,\n       -1.74493502e+00, -1.15098615e+00, -3.35875099e-01, -2.26985179e+00,\n       -1.03194595e+00, -1.20979431e+00, -1.13704630e+00,  1.84959225e-01,\n       -1.71293914e+00,  8.90975580e-01,  8.37127107e-01,  1.66168789e+00,\n        6.27037745e-01,  1.28151211e+00, -1.71259119e+00,  2.19843929e+00,\n       -1.35639226e+00, -6.62672085e-01, -1.20282899e-01,  9.60808702e-01,\n        1.57423783e+00,  2.53094449e-01,  3.21981343e-02, -1.46783542e+00,\n        1.45231475e+00, -1.15898146e+00,  5.71203152e-01, -5.83852889e-01,\n       -7.49940372e-01,  1.01959571e-01,  1.89293120e-01,  1.24979286e+00,\n        7.81707636e-01,  7.52000365e-04,  8.56621339e-01, -1.19218480e+00,\n       -5.92753601e-01,  7.71887115e-01,  6.03339952e-02,  1.23196675e+00,\n        6.39433538e-01, -1.31886700e+00, -8.70213368e-01,  6.57508790e-01,\n        1.67875124e+00, -9.10384729e-01,  9.63133131e-01, -5.00126043e-01,\n       -1.05901909e+00,  1.22607812e-01,  1.13338039e+00, -2.02111370e+00,\n       -7.18707022e-02, -8.94408599e-01,  8.16170267e-01, -1.07543487e+00,\n        4.71215403e-01, -2.09768660e+00, -6.23564276e-01, -2.22337133e-03,\n        6.21396576e-01, -6.31540982e-01, -7.16735013e-01,  1.58111796e-01,\n       -1.01047777e-01, -2.92551618e-01, -2.24537179e-01, -2.24411857e-01,\n       -2.61092760e+00, -4.90406008e-02, -4.03618687e-02,  7.82522667e-01,\n       -7.76294752e-01,  7.85629142e-01, -4.66963615e-01,  4.36956126e-01,\n        5.97550148e-01, -1.08670825e+00,  9.41685295e-01,  6.96987553e-01,\n        5.78954320e-01, -1.04169727e+00,  1.86666969e-01, -8.39035847e-02,\n       -1.49452037e+00, -1.22269202e+00, -1.42874024e-01, -1.56071140e+00,\n        5.86216991e-01, -3.86704244e-01, -5.78147765e-01, -1.37967065e+00,\n        2.30263159e-01, -2.24472572e+00, -7.31437893e-01, -6.78182490e-01,\n        1.57203877e-01, -2.13871505e+00, -6.90166535e-01,  1.34919031e+00,\n       -6.93833080e-01, -7.93737905e-01, -4.96819208e-03, -1.14623382e-01,\n       -4.64310504e-01,  1.10469324e-01, -9.93190978e-01, -4.99093868e-01,\n        1.76767742e-01, -2.46547970e+00, -2.58013689e+00,  8.55815004e-01,\n        5.49621990e-01,  2.20599043e-01, -6.54790727e-01,  1.88339742e-01,\n       -6.78658880e-01,  1.65945895e+00, -7.63301076e-01,  1.24064403e+00,\n       -2.06160950e+00,  1.35942866e+00, -1.54683043e+00, -1.33374101e-01,\n       -2.45719422e-01,  9.54104803e-01,  5.71854119e-02, -7.87217670e-01,\n        8.03966058e-01, -8.07387046e-01,  7.56816796e-01,  3.58923109e-01,\n       -5.12082792e-01,  5.31030670e-02, -8.51810270e-01,  6.40149105e-02,\n       -2.70533823e-01, -9.66714121e-01, -7.29718472e-01,  4.59801434e-01,\n       -6.96240974e-01,  3.83606799e-01,  3.64081417e-01,  8.29234316e-02,\n       -1.49449511e+00, -1.15780011e+00, -1.55048262e+00, -1.43560290e+00,\n        1.13657025e+00, -7.59908026e-02, -9.98159724e-01, -2.65535329e-01,\n        7.14594729e-01,  7.34281984e-01,  1.79326017e+00,  5.92284222e-01,\n        1.23276224e+00,  2.26415892e-01,  1.59849050e+00, -1.15722930e-01,\n        8.14615393e-01,  8.60333074e-01, -4.94152970e-02, -2.98311312e-01,\n        1.80916630e-01, -4.00343119e-01, -1.25863526e+00, -1.52305706e-02,\n       -1.47274034e+00, -1.33296326e+00,  8.72589015e-01,  1.10832343e+00,\n       -7.91169789e-01, -1.22801110e+00,  5.50814180e-01, -1.13641779e+00,\n        2.60846033e-01, -4.07898123e-01,  9.58781293e-03,  1.85326732e-01,\n       -7.81126938e-01,  5.72312889e-01,  1.40029190e+00,  5.15201175e-02,\n       -1.49320903e-01, -6.59323932e-01,  8.56948582e-01, -3.03698510e-01,\n        1.49511955e+00, -3.69597893e-02,  7.08325128e-01, -6.88180264e-01,\n        8.03899940e-01,  1.38379361e+00,  2.99338001e-01,  3.97158606e-02,\n       -4.33230977e-01,  8.86931290e-01, -4.74808207e-01, -4.15928727e-01,\n       -5.37645949e-01, -2.12010516e+00,  9.05968871e-01,  7.74921733e-01,\n        1.52166222e+00, -2.19200324e+00, -1.25670580e+00, -6.60534633e-01,\n       -3.27251430e-01,  6.06591619e-01, -3.25352907e-01, -8.70809328e-01,\n       -7.47515182e-01,  1.57405242e+00, -8.97476777e-01,  5.77009561e-01,\n       -1.33766649e+00, -1.60146149e+00, -1.97226036e-01, -2.52707177e-01,\n       -1.32460374e+00,  4.95502458e-01,  4.85556661e-02,  1.93492541e-01,\n       -1.08436213e+00,  1.09765287e+00, -1.58396746e+00, -1.91025024e-01,\n        2.72494660e-01,  4.62184699e-01,  8.77807879e-01, -5.21276631e-01,\n        1.24142964e+00, -4.86324534e-02, -5.80826582e-01, -1.80524924e+00,\n        1.33917529e+00,  1.73193280e-01,  9.25547093e-01,  9.62107392e-01,\n       -9.91748847e-01,  5.23188152e-02,  9.41964683e-01, -1.92808083e-01,\n        2.07589026e+00, -9.09461601e-01, -2.05273253e+00, -7.15973238e-02,\n       -8.57123282e-01, -2.95758393e-01,  7.42326822e-01,  3.54375313e-01,\n        2.36930029e+00,  1.97554175e+00, -3.09343924e-01, -6.85033198e-01,\n        4.39635183e-01, -1.21838771e+00,  1.05682491e+00,  5.94738429e-01,\n       -6.25025783e-02, -7.50079090e-01, -5.29162960e-01, -1.79040780e-01,\n       -4.97785900e-01,  1.19670937e-01, -1.76191040e-01, -2.99719843e-01,\n       -2.46442830e-01, -4.90155275e-01, -1.65839959e+00, -1.99573169e+00,\n        4.91137618e-01,  2.03902374e-01,  1.20093209e+00,  4.62315836e-01,\n        5.14960555e-01,  1.00863069e+00, -1.27761555e+00,  1.31366433e+00,\n       -1.61460246e+00,  2.95426687e-01,  1.72513103e+00,  2.95846867e-01,\n        1.17757763e-01, -6.82733416e-01,  5.81123895e-01, -8.76397574e-01,\n        9.36310157e-01,  8.01440504e-01, -4.45359046e-03, -6.90024242e-01,\n        9.71094141e-01,  1.37141785e-01,  4.75550112e-01, -2.00166422e+00,\n       -1.80073312e-01, -1.18799358e+00, -1.55202994e+00,  6.52228657e-01,\n        2.80657663e-01,  3.63884084e-01,  1.35504981e-01,  1.62238450e-01,\n       -3.42178167e-01, -7.57239582e-01,  1.43467451e-01,  1.26866543e-01,\n       -4.51150817e-01,  2.92453787e-01,  4.77355525e-01, -6.05793034e-01,\n       -2.41401617e+00,  6.51708593e-01, -3.52981452e-01,  6.09746677e-01,\n       -4.00905637e-01, -1.39693790e+00, -6.95943364e-01, -5.28528589e-01,\n        1.44102250e+00,  1.48087882e+00,  1.54544605e+00,  1.53259407e+00,\n       -8.26680979e-01,  7.67486723e-01, -1.51707829e-01,  1.34891652e+00,\n       -1.36629352e-01,  7.74224604e-01, -4.88878653e-01, -1.92652853e-01,\n        5.81699510e-01,  4.27564965e-01, -1.24340344e+00, -2.42478451e-01,\n        6.63714879e-02,  1.35427194e-01, -3.87178200e-01,  1.42232181e+00,\n        1.17918945e+00,  9.40170122e-02,  1.92140270e-01,  1.76317106e+00,\n        1.59646411e-01, -5.34343253e-01, -2.30640544e-01, -5.92408476e-01,\n       -1.71578242e+00, -1.11858921e-01,  2.53827872e-01,  9.46645896e-01,\n       -5.83952803e-01,  9.34344949e-02,  8.03029235e-02,  2.15499345e+00,\n       -3.74134493e-02, -8.36558377e-01, -1.72310068e+00, -1.39746395e+00,\n        4.34059250e-01, -1.31511952e+00, -1.91786419e-01,  3.09997381e-01,\n       -1.43284842e+00, -1.47020501e+00, -5.19428418e-01,  1.97960922e-01,\n        7.61020184e-01,  1.83555879e-01, -2.41952619e-01,  2.33918488e+00,\n        7.59591849e-01, -3.31728796e-01,  1.06754874e+00, -1.10692701e+00,\n       -1.87227414e+00,  3.38725306e-01,  1.47925087e-01, -2.11190788e-01,\n        6.90986388e-01,  3.47723606e-01, -1.21067437e+00,  3.03342490e-01,\n        3.07803760e-01,  7.77084992e-01, -7.54220752e-01, -3.01032605e-01,\n        9.01828591e-01,  3.68444721e-01, -6.75508489e-01,  2.22782056e-01,\n       -7.14700748e-01, -5.26436166e-01, -8.07751536e-01, -5.70709857e-01,\n        3.21685212e-01,  1.69841748e+00, -1.19516147e+00,  2.72579321e-01,\n        5.44918245e-01, -1.87482584e-01,  3.78101054e-01,  2.15165876e-01,\n       -1.30921435e+00,  1.47276348e-01, -6.41164155e-01, -1.58454461e-01,\n       -4.02739273e-01, -3.17909755e-02,  2.56087826e-01, -1.13576382e+00,\n       -1.16833229e-02,  2.81683617e-01, -1.06916824e+00, -6.77280920e-01,\n       -3.95726116e-01,  6.43009343e-01, -2.02789172e+00,  4.84411015e-01,\n       -1.53526397e-01, -5.36465536e-01, -1.82901591e+00, -1.16527640e+00,\n        4.93241029e-02,  3.21031244e-01,  9.57708061e-01,  5.47908641e-01,\n        1.12209207e+00, -1.74860633e+00, -4.70686524e-01, -3.40214014e-01,\n        5.17274057e-01, -7.66191059e-01, -5.13959324e-01, -1.08147539e+00,\n       -1.42682293e+00,  5.53645258e-01,  8.52236268e-01,  4.96675014e-01,\n        4.40433776e-01,  9.45891068e-01, -3.68361202e-01, -7.05990302e-01,\n       -1.93907930e+00, -1.38957779e-01, -1.24189943e-01,  1.81173783e-01,\n       -3.29453697e-01,  2.35558909e-01,  4.51625966e-01, -1.67843309e+00,\n       -1.75317997e+00, -1.27249823e+00,  1.57236789e-01, -3.26405797e-01,\n        4.65522028e-01, -1.09324711e+00,  1.03479490e+00, -9.19743051e-01,\n        6.57724742e-01,  2.69866152e+00, -5.53583369e-01, -6.57656701e-01,\n       -5.15774705e-01,  1.99634498e+00, -1.66673434e+00, -3.45758081e-02,\n        9.89863934e-02,  4.78981707e-01, -4.08156241e-01,  7.14092401e-01,\n        2.51265047e-01, -4.43021072e-01,  7.72506368e-01, -6.03685919e-01,\n        5.89777653e-01,  2.41685880e-01,  4.53725799e-01,  1.20677767e+00,\n       -3.91338686e-01, -6.95468536e-01, -2.55729219e-03,  1.97647456e+00,\n       -9.75386777e-01, -4.25740470e-01, -3.24233487e-01, -6.45017087e-01,\n       -2.62455660e-01, -1.08931432e+00,  3.17838930e-01,  9.70148399e-01,\n        9.09678062e-02, -2.33606373e+00,  9.23984189e-01,  1.32047454e+00,\n       -1.18484178e-01,  1.59050430e-01,  1.08597063e+00,  9.45459960e-01,\n        2.57123661e-01, -2.46399512e+00, -1.59381380e+00, -9.51538838e-01,\n       -1.95396064e-01,  4.90059061e-01,  1.23809874e-01,  1.33613251e+00,\n       -8.61283714e-01, -1.16773855e-01, -1.17889272e-01, -1.20899577e-02,\n       -3.93928597e-01,  2.11119053e+00,  5.03100551e-01, -8.76537288e-01,\n       -1.34153559e+00, -6.57800606e-01, -1.04156232e+00, -4.59882554e-01,\n        1.46301633e-01, -1.42119385e+00,  8.47277333e-01, -8.17647078e-01,\n       -4.68741670e-01, -1.49300133e-01,  1.11402458e+00, -2.18140631e-02,\n       -7.98056666e-01,  8.15475248e-01, -1.41021857e-01,  1.19158278e+00,\n       -1.10961158e-02, -2.35770937e-01,  2.20015299e+00,  9.11555744e-01,\n       -1.17570456e+00,  2.07240032e+00, -2.00867337e-01, -2.03746614e-01,\n       -9.31096278e-01, -8.31208071e-01,  1.56175113e-01, -1.47351706e-01,\n       -4.44649841e-01, -1.91174821e+00,  4.68143631e-01, -1.29296055e-01,\n       -6.68861951e-01,  1.06365343e+00,  3.30472066e-01, -5.58751437e-01,\n       -1.59562862e+00, -4.57452803e-01, -1.43102020e+00,  1.83841414e+00,\n        1.54449758e+00, -9.20714929e-01,  1.04549938e+00,  6.83949520e-01,\n        1.30727418e+00, -1.69364378e+00,  1.70634740e-01, -3.61428855e-01,\n        9.41212225e-01,  1.94971363e+00,  2.88563023e+00, -8.28009125e-01,\n        9.87795051e-01, -1.18482307e+00, -4.17197314e-01,  2.02741881e-01,\n        5.59203779e-01, -3.32104319e-01, -1.29833334e-01,  1.60138321e-01,\n        1.02917857e+00, -4.39242637e-01,  3.31452446e-01, -5.42459773e-01,\n        8.56814417e-01,  9.62115454e-01,  1.45763747e-01,  1.43378254e+00,\n       -4.61350832e-02,  1.02065255e-01,  4.16513918e-01,  2.01127118e-01,\n       -4.59173698e-01,  2.21232744e+00, -1.09853894e+00, -5.12600514e-01,\n        1.20820543e+00,  6.19754339e-01,  4.51188654e-01, -9.77522882e-01,\n        1.16086458e+00,  4.92301991e-01,  1.33618205e+00,  1.29839645e+00,\n        6.81860822e-01,  1.84126615e-01, -8.75621384e-01, -1.18166619e+00,\n       -7.54514183e-01, -5.39527162e-01,  1.61007330e+00,  9.15412265e-01,\n       -2.93501344e-01, -2.17692818e+00,  2.21297898e-01,  5.66181428e-01,\n       -4.62393117e-01,  3.14952576e-01,  8.89469792e-01, -9.22195870e-02,\n       -3.35943638e-02,  9.01605937e-01, -8.19774372e-01, -5.50217459e-01,\n       -1.89282926e+00,  4.21807040e-01,  1.36692223e-01, -1.20732229e+00,\n        9.18362205e-01,  9.71595713e-02,  1.29295342e+00,  1.72002555e+00,\n       -1.06806505e+00,  1.37862961e+00, -3.00969024e-01, -1.58359808e+00,\n       -5.74750555e-01,  2.03933705e+00, -1.72458008e-01, -1.72690316e-01,\n        1.01316396e+00,  4.52820416e-02, -1.63976060e+00,  4.32936660e-01,\n       -1.03370619e+00,  4.70830317e-01, -8.42776061e-01,  2.11024806e+00,\n        1.23133114e+00, -1.17378714e+00, -1.77569785e-01, -4.10867118e-01,\n       -6.84752779e-01,  8.79075087e-01, -4.69094776e-01, -2.18863574e-01,\n        1.05486266e+00,  1.27091754e+00,  1.02177569e-01, -8.81411583e-01,\n        1.24693651e+00,  2.16627854e-01,  1.03952499e+00, -6.35808789e-01,\n        9.06785542e-01,  1.39137527e+00, -2.20943989e-01,  4.55833825e-01,\n        4.71348457e-01,  4.70818594e-01, -1.69254335e+00,  4.02247389e-01,\n        9.01894121e-01, -1.43279664e+00, -4.08837509e-01,  1.76324806e+00,\n        1.47580014e+00,  2.60369644e-01,  3.62282524e-01,  1.05779976e+00,\n        1.97150704e+00, -1.57280150e+00, -4.93260125e-01, -5.74962221e-01,\n        1.80117916e+00, -4.03758775e-01, -8.38407877e-01, -6.69780239e-01,\n       -9.08954580e-02, -6.04782854e-01,  5.44054812e-01, -6.04232658e-01,\n       -1.58073471e-01,  2.19780079e+00, -4.83266403e-01, -3.24836956e-01,\n       -6.63994640e-01, -8.73798195e-02, -1.46976225e-01, -3.90611744e-01,\n       -9.40882186e-01, -1.20136529e+00, -1.90556937e+00, -6.30677591e-01,\n       -2.98225997e-01,  1.20304370e+00, -3.12630009e-01,  5.54443869e-01,\n       -1.43047319e+00, -1.01549838e+00,  6.49384307e-01, -2.51834332e-01,\n        1.25130979e+00, -1.38422679e-01, -8.68116155e-01, -1.45318128e+00,\n       -2.16365706e-01, -7.26953930e-01,  1.15356985e-01, -1.72087743e-01,\n       -6.94299654e-01, -7.38637190e-01,  1.61401824e+00, -3.28419143e-01,\n       -6.32046349e-01, -1.93917887e-01, -5.00289063e-01,  6.44907875e-01,\n       -3.15041429e-01, -1.03865720e+00,  1.17443750e+00, -1.23450531e+00,\n        1.84711038e-01, -1.11168566e+00,  2.23479954e-01,  7.62327686e-01,\n        9.19497975e-01,  7.20913943e-01,  2.63744109e-02,  8.58978580e-01,\n       -4.57682640e-01,  7.21830083e-01, -9.36875176e-01, -1.72232905e+00,\n       -3.66882209e-02, -1.68464867e+00, -8.22339824e-02,  1.91180071e+00,\n        8.59431894e-01, -1.35949729e+00, -2.05180893e+00, -1.17255079e+00,\n        5.46153785e-01,  4.09779545e-01,  3.53386717e-01, -1.22334532e+00,\n       -2.51226759e+00, -1.41898497e+00, -9.18486460e-01, -2.80322255e-01,\n        1.56296561e+00, -1.64134889e+00, -1.51883414e+00, -2.51319930e-01,\n        7.95825338e-01, -3.04080451e-01, -1.25744523e+00,  9.58941796e-01,\n        1.23114253e-01, -1.58979437e+00, -2.04401606e-01, -1.31756178e-01,\n       -2.75364184e-01, -6.41657203e-02, -1.63996808e-01,  3.32404076e-02])"
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g1 = np.random.randn(1000)\n",
    "g1"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.482918Z",
     "end_time": "2024-05-07T18:54:11.498641Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [],
   "source": [
    "g = (g - g.min()) / 10\n",
    "phy = np.round(((100.1 - 20) * g + 20), 1)\n",
    "g1 = (g1 - g1.min()) / 10\n",
    "mat = np.round(((100.1 - 20) * g1 + 20), 1)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.498641Z",
     "end_time": "2024-05-07T18:54:11.537595Z"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 2.简单的统计函数"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [
    {
     "data": {
      "text/plain": "42.282300000000006"
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(phy)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.515874Z",
     "end_time": "2024-05-07T18:54:11.537595Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "outputs": [
    {
     "data": {
      "text/plain": "7.839957698227714"
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.std(phy)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.525048Z",
     "end_time": "2024-05-07T18:54:11.537595Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [
    {
     "data": {
      "text/plain": "(20.0, 69.0)"
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.min(phy), np.max(phy)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.537595Z",
     "end_time": "2024-05-07T18:54:11.553652Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [
    {
     "data": {
      "text/plain": "48.9"
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.percentile(phy, 80)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.553652Z",
     "end_time": "2024-05-07T18:54:11.632582Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [
    {
     "data": {
      "text/plain": "42.3"
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.median(phy)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.573025Z",
     "end_time": "2024-05-07T18:54:11.637624Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[27.5, 29.5, 44.6, ..., 52.9, 34.2, 34.5],\n       [64.7, 59. , 41.5, ..., 49.9, 49.1, 50.7]])"
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "marks = np.vstack((phy, mat))\n",
    "marks"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.586989Z",
     "end_time": "2024-05-07T18:54:11.637624Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "outputs": [
    {
     "data": {
      "text/plain": "array([42.2823, 49.7819])"
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(marks, axis=1)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.614635Z",
     "end_time": "2024-05-07T18:54:11.637624Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "outputs": [
    {
     "data": {
      "text/plain": "array([46.1 , 44.25, 43.05, 55.1 , 42.25, 48.45, 40.15, 51.35, 47.45,\n       53.05, 50.1 , 48.85, 46.75, 53.6 , 41.7 , 47.15, 42.9 , 47.45,\n       53.9 , 49.2 , 50.  , 38.1 , 39.3 , 39.1 , 42.35, 34.9 , 43.25,\n       41.25, 44.15, 53.35, 48.9 , 41.3 , 53.65, 44.5 , 46.25, 43.6 ,\n       48.15, 34.25, 47.05, 56.5 , 48.95, 52.45, 49.15, 36.65, 49.35,\n       47.3 , 43.3 , 43.7 , 58.5 , 42.1 , 41.6 , 39.25, 48.2 , 37.95,\n       59.4 , 53.65, 41.9 , 46.25, 43.35, 40.4 , 39.2 , 45.6 , 41.65,\n       41.5 , 40.15, 42.25, 45.4 , 44.3 , 41.7 , 48.  , 30.65, 45.4 ,\n       50.45, 53.95, 46.2 , 40.2 , 46.7 , 47.8 , 41.05, 48.7 , 50.55,\n       45.45, 42.65, 46.05, 37.2 , 60.4 , 39.8 , 45.3 , 39.25, 51.1 ,\n       47.75, 49.3 , 39.75, 42.95, 44.75, 43.95, 45.25, 44.  , 37.5 ,\n       48.5 , 44.15, 44.35, 49.9 , 45.25, 53.45, 43.9 , 56.9 , 53.2 ,\n       43.9 , 41.25, 52.8 , 48.25, 41.8 , 47.2 , 40.85, 42.25, 40.85,\n       49.9 , 53.35, 48.7 , 45.8 , 45.55, 53.3 , 41.8 , 41.55, 49.3 ,\n       45.35, 43.  , 47.05, 51.85, 43.8 , 51.8 , 43.45, 38.4 , 41.95,\n       39.55, 42.1 , 45.1 , 54.3 , 34.1 , 59.1 , 51.45, 53.6 , 38.95,\n       35.85, 48.3 , 37.15, 43.25, 48.5 , 50.6 , 44.9 , 48.8 , 47.75,\n       58.5 , 40.85, 43.05, 45.  , 43.95, 55.3 , 49.55, 52.15, 41.25,\n       42.8 , 49.85, 45.75, 47.7 , 31.85, 43.45, 45.6 , 45.15, 41.15,\n       43.75, 55.9 , 42.05, 42.25, 55.05, 46.2 , 58.2 , 46.45, 39.45,\n       47.85, 59.95, 42.95, 49.85, 42.4 , 36.75, 56.05, 53.55, 48.95,\n       51.3 , 47.1 , 44.4 , 51.55, 47.85, 40.9 , 53.15, 49.2 , 48.2 ,\n       45.05, 55.8 , 43.15, 55.35, 45.1 , 43.75, 38.6 , 41.6 , 41.5 ,\n       39.6 , 47.6 , 34.6 , 53.25, 48.9 , 52.55, 35.8 , 44.15, 46.15,\n       43.2 , 41.95, 47.55, 41.65, 38.55, 52.7 , 40.85, 44.65, 43.45,\n       43.7 , 49.1 , 41.8 , 37.4 , 42.15, 40.4 , 36.65, 46.95, 44.7 ,\n       36.8 , 40.55, 40.3 , 41.5 , 54.85, 59.05, 46.  , 46.2 , 38.05,\n       47.05, 40.8 , 38.65, 40.1 , 48.8 , 53.35, 42.6 , 44.05, 37.7 ,\n       61.45, 41.15, 46.2 , 45.3 , 44.05, 50.6 , 53.7 , 49.1 , 55.65,\n       41.95, 53.55, 45.55, 45.55, 46.15, 41.85, 49.6 , 52.35, 39.1 ,\n       41.15, 48.85, 49.25, 40.8 , 50.  , 40.5 , 35.05, 42.3 , 53.6 ,\n       38.75, 43.35, 42.1 , 46.6 , 39.85, 48.25, 38.4 , 49.75, 47.9 ,\n       46.9 , 41.35, 47.55, 40.15, 45.05, 48.05, 36.9 , 46.35, 31.85,\n       46.15, 43.7 , 52.2 , 45.65, 50.6 , 36.4 , 46.8 , 50.7 , 44.05,\n       56.55, 47.  , 47.6 , 40.95, 42.5 , 42.45, 39.35, 45.3 , 45.35,\n       44.  , 55.25, 49.6 , 46.55, 34.15, 48.4 , 33.95, 40.75, 53.1 ,\n       47.15, 34.65, 44.6 , 50.6 , 47.35, 34.9 , 48.75, 46.85, 39.45,\n       44.15, 43.3 , 46.05, 43.45, 40.4 , 32.5 , 50.8 , 53.3 , 51.75,\n       47.5 , 47.6 , 42.55, 49.35, 46.75, 57.15, 39.05, 53.35, 39.4 ,\n       48.05, 43.3 , 57.8 , 44.25, 40.  , 47.3 , 46.4 , 48.75, 47.85,\n       48.55, 40.6 , 38.85, 47.  , 50.7 , 41.85, 41.9 , 43.35, 38.6 ,\n       48.1 , 50.3 , 47.45, 42.1 , 42.75, 40.35, 44.7 , 48.1 , 55.55,\n       32.45, 44.8 , 51.3 , 49.65, 56.  , 51.25, 49.05, 46.2 , 58.8 ,\n       44.2 , 56.9 , 55.05, 47.7 , 41.9 , 52.05, 51.6 , 47.8 , 49.5 ,\n       38.9 , 46.35, 44.7 , 53.8 , 42.45, 36.65, 54.1 , 39.4 , 52.25,\n       43.75, 51.3 , 44.65, 34.95, 38.65, 51.4 , 51.1 , 48.55, 43.55,\n       56.75, 48.2 , 52.75, 45.45, 54.05, 45.7 , 46.95, 56.95, 46.9 ,\n       47.35, 43.6 , 49.9 , 47.35, 48.  , 45.15, 29.5 , 50.4 , 53.4 ,\n       51.15, 34.85, 46.45, 45.35, 41.9 , 52.45, 49.25, 41.2 , 50.75,\n       49.75, 43.  , 52.7 , 40.9 , 37.2 , 42.95, 47.75, 40.85, 51.2 ,\n       39.85, 45.05, 42.55, 50.9 , 33.  , 42.3 , 48.5 , 52.1 , 46.85,\n       45.2 , 48.55, 41.1 , 44.7 , 36.95, 51.6 , 49.5 , 47.55, 48.8 ,\n       44.6 , 47.  , 44.95, 43.6 , 58.9 , 41.7 , 39.6 , 48.05, 39.55,\n       44.15, 47.6 , 46.8 , 53.9 , 54.6 , 46.85, 38.4 , 50.5 , 39.3 ,\n       46.1 , 46.15, 42.25, 43.8 , 39.05, 49.95, 51.65, 40.1 , 44.9 ,\n       42.35, 42.2 , 49.75, 40.8 , 44.05, 52.4 , 47.7 , 50.  , 43.85,\n       47.4 , 50.3 , 37.35, 49.45, 44.8 , 46.65, 59.15, 44.95, 47.4 ,\n       48.1 , 46.7 , 42.4 , 52.4 , 54.95, 42.7 , 37.  , 42.4 , 56.85,\n       46.75, 41.25, 43.3 , 37.65, 41.75, 48.25, 50.8 , 48.45, 43.  ,\n       40.55, 45.95, 45.5 , 44.2 , 38.4 , 52.6 , 49.95, 45.3 , 41.1 ,\n       38.3 , 52.1 , 46.35, 53.25, 38.95, 33.05, 40.9 , 38.4 , 58.05,\n       49.6 , 54.  , 54.85, 44.7 , 49.1 , 46.95, 49.45, 50.6 , 48.35,\n       47.25, 48.  , 48.1 , 51.9 , 37.75, 42.4 , 50.25, 48.7 , 42.9 ,\n       50.45, 50.85, 46.15, 43.3 , 56.6 , 47.7 , 47.45, 42.15, 49.4 ,\n       45.1 , 48.65, 51.75, 53.7 , 43.7 , 48.7 , 44.95, 53.2 , 51.4 ,\n       46.8 , 41.9 , 38.6 , 45.95, 43.3 , 43.7 , 48.4 , 36.25, 41.1 ,\n       41.  , 42.6 , 49.2 , 48.2 , 40.35, 56.3 , 49.7 , 43.8 , 53.95,\n       46.9 , 41.7 , 54.2 , 57.35, 43.  , 53.55, 49.  , 38.  , 50.95,\n       55.75, 49.5 , 43.7 , 45.05, 53.25, 50.8 , 50.5 , 44.25, 44.6 ,\n       42.4 , 41.4 , 42.05, 48.  , 49.25, 44.45, 46.6 , 43.45, 47.85,\n       49.35, 45.65, 41.35, 48.45, 49.15, 43.45, 44.75, 53.15, 44.05,\n       46.85, 48.1 , 46.4 , 46.3 , 44.  , 40.3 , 45.55, 34.2 , 49.55,\n       38.65, 40.7 , 35.05, 45.05, 46.3 , 54.3 , 44.7 , 53.7 , 55.  ,\n       36.45, 50.  , 48.3 , 51.3 , 44.75, 39.3 , 36.8 , 43.6 , 53.8 ,\n       45.3 , 43.3 , 49.45, 45.5 , 42.9 , 47.6 , 45.65, 42.2 , 39.6 ,\n       42.7 , 48.1 , 44.8 , 47.5 , 42.65, 33.2 , 42.6 , 53.95, 48.95,\n       52.45, 38.1 , 51.25, 32.75, 46.45, 50.7 , 49.05, 40.5 , 47.5 ,\n       54.  , 38.6 , 49.75, 48.65, 49.2 , 48.35, 56.85, 48.8 , 33.45,\n       51.95, 44.3 , 49.6 , 43.3 , 52.1 , 48.05, 42.6 , 45.05, 40.8 ,\n       51.75, 42.1 , 52.15, 48.  , 46.35, 45.6 , 43.55, 36.55, 53.9 ,\n       43.4 , 35.8 , 46.55, 47.05, 56.05, 51.3 , 50.9 , 49.55, 43.75,\n       35.8 , 34.45, 40.  , 41.95, 49.35, 43.95, 50.  , 46.55, 41.85,\n       39.9 , 49.45, 48.7 , 57.85, 45.3 , 43.65, 35.8 , 37.5 , 47.75,\n       51.05, 42.7 , 40.55, 51.9 , 48.55, 44.1 , 39.85, 53.75, 48.6 ,\n       47.1 , 39.3 , 48.3 , 53.6 , 43.6 , 45.25, 51.15, 54.7 , 43.7 ,\n       51.75, 39.45, 45.7 , 47.8 , 42.1 , 48.9 , 49.15, 48.05, 44.9 ,\n       46.15, 42.15, 37.45, 60.1 , 47.4 , 38.75, 38.5 , 43.4 , 44.8 ,\n       55.35, 51.2 , 40.45, 46.35, 48.5 , 55.25, 41.9 , 49.25, 41.05,\n       57.15, 50.3 , 59.5 , 44.15, 52.3 , 45.15, 47.25, 47.25, 46.25,\n       47.7 , 52.05, 44.4 , 45.15, 45.6 , 47.4 , 36.15, 45.25, 53.05,\n       53.05, 50.15, 41.6 , 44.8 , 52.35, 47.9 , 44.5 , 57.95, 37.9 ,\n       43.3 , 55.55, 47.6 , 45.95, 39.95, 50.35, 52.15, 48.7 , 59.  ,\n       53.8 , 52.4 , 42.7 , 43.3 , 41.75, 56.4 , 50.35, 43.25, 47.3 ,\n       43.3 , 49.85, 42.75, 53.65, 50.4 , 48.4 , 51.65, 45.65, 55.7 ,\n       45.05, 45.1 , 41.3 , 43.75, 46.5 , 39.35, 47.7 , 39.95, 45.15,\n       54.1 , 34.85, 55.65, 45.3 , 39.85, 47.35, 59.4 , 49.15, 43.65,\n       52.15, 51.35, 38.55, 43.3 , 38.35, 46.7 , 42.05, 44.45, 49.45,\n       42.  , 45.1 , 48.25, 44.5 , 47.45, 46.4 , 40.95, 52.3 , 49.35,\n       48.35, 54.15, 49.15, 44.3 , 49.  , 40.25, 42.  , 53.5 , 39.75,\n       47.2 , 45.15, 47.05, 44.95, 47.85, 49.55, 47.25, 45.5 , 42.4 ,\n       58.2 , 51.55, 48.05, 55.45, 56.1 , 37.  , 44.4 , 39.15, 53.55,\n       45.8 , 42.4 , 45.  , 44.25, 47.05, 49.85, 40.9 , 39.35, 53.85,\n       43.65, 45.95, 36.2 , 50.75, 44.5 , 45.05, 44.25, 45.8 , 43.85,\n       46.15, 45.1 , 46.35, 45.85, 45.95, 34.1 , 37.6 , 43.1 , 48.45,\n       62.25, 47.65, 43.65, 37.15, 45.3 , 47.6 , 53.75, 46.05, 39.15,\n       45.9 , 51.7 , 43.75, 52.25, 37.6 , 49.6 , 43.5 , 40.4 , 40.15,\n       52.3 , 44.35, 48.7 , 47.6 , 48.5 , 40.85, 53.75, 48.3 , 38.25,\n       52.8 , 43.7 , 51.  , 39.85, 39.75, 43.  , 39.15, 42.15, 49.5 ,\n       49.6 , 34.25, 40.3 , 42.35, 45.9 , 42.55, 50.55, 45.55, 35.25,\n       40.55, 43.  , 42.5 , 55.45, 36.  , 45.1 , 49.75, 50.25, 45.55,\n       40.75, 45.05, 45.7 , 43.3 , 48.7 , 43.75, 44.05, 51.4 , 41.65,\n       42.6 ])"
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(marks, axis=0)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.637624Z",
     "end_time": "2024-05-07T18:54:11.649864Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "outputs": [
    {
     "data": {
      "text/plain": "array([7.8399577, 7.892527 ])"
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.std(marks, axis=1)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.653507Z",
     "end_time": "2024-05-07T18:54:11.721527Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "outputs": [
    {
     "data": {
      "text/plain": "array([44.6, 46.6, 47.8, 45.1, 46.9, 46.5, 55.1, 47.3, 43.5, 49.8, 44.6,\n       44.5, 45. , 43. , 45. , 45. , 49.9, 42.5, 52.9, 44.3, 48.1, 43.4,\n       42.9, 44.3, 46.9, 44.9, 42.6, 62.1, 49.7, 46.3, 44.7, 48.3, 48.2,\n       48.7, 54.5, 43.9, 43.3, 52.8, 49.8, 55.4, 43.3, 47.1, 57.9, 44.9,\n       54.1, 51.5, 43.2, 52. , 52.7, 47.2, 53.5, 46.1, 54.1, 57.9, 55.3,\n       45.6, 42.5, 45. , 43.9, 44.9, 46.5, 49.4, 48.5, 44.2, 49.1, 57. ,\n       50.4, 45.8, 48.7, 44. , 52.9, 55.4, 45.6, 47.5, 48.3, 44.8, 44.2,\n       48. , 43.9, 45.3, 48.7, 47.5, 44.8, 42.7, 42.6, 43.2, 58.1, 45.2,\n       47.6, 43.7, 47.5, 50.6, 56.5, 67.8, 46.1, 44.2, 46.3, 48.7, 47.1,\n       54.7, 47.5, 43.2, 47.8, 51.2, 69. , 53.8, 52.8, 43.5, 51.6, 44.6,\n       49.8, 50. , 44.7, 45.3, 44.2, 44.9, 49.5, 43.1, 51.8, 48.7, 43.9,\n       52.6, 54.4, 43.7, 60.9, 44.9, 43.7, 50. , 55.5, 54.6, 49.8, 50.2,\n       45.4, 49.2, 47.7, 43.3, 42.3, 43.2, 54.1, 45.4, 50.4, 48. , 44.1,\n       42.3, 47.7, 47.1, 44.5, 46.2, 46.4, 55.1, 50. , 50.1, 55.4, 51.9,\n       47.3, 44.5, 61.2, 42.6, 44.3, 49.8, 47.1, 44.2, 44.1, 45.7, 50.1,\n       44.3, 51.8, 51.3, 49.8, 43.3, 49.2, 54. , 44.2, 45.4, 46.8, 57.5,\n       48.9, 42.4, 50.8, 43.1, 53.2, 42.7, 47.3, 43.8, 45.8, 44.4, 42.7,\n       50.5, 61.3, 46.5, 43. , 47.2, 47.3, 54.4, 56.9, 52.8, 45.4, 52.2,\n       56. , 55.3, 48.7, 53. , 48.3, 53.4, 52. , 52.1, 51.4, 47.9, 56.2,\n       48.4, 43.1, 52. , 46.5, 52.4, 44. , 42.3, 48.1, 48.9, 44.2, 43.1,\n       50.2, 52.6, 45.6, 49.6, 50.7, 57.1, 42.8, 50.4, 47.1, 48. , 43.4,\n       42.6, 44.4, 50.1, 44.2, 43.6, 47.2, 46.7, 43.2, 50.8, 45.2, 46.3,\n       43. , 45.8, 47.1, 43.2, 50.9, 56.9, 53. , 44.5, 53.7, 50.5, 43.4,\n       52.1, 54.1, 43.4, 51.3, 46.9, 53.1, 62.2, 48.1, 45.5, 48.9, 43.6,\n       44.2, 46.7, 58.4, 47.1, 45.5, 48.6, 45.1, 51.2, 54.1, 45.2, 47. ,\n       45.6, 44.7, 51.9, 48. , 47.1, 50. , 49.6, 45.9, 48.7, 43.7, 48.8,\n       53.1, 53.5, 47.8, 51.1, 49.4, 46.2, 52.7, 49.9, 47.2, 46.7, 43.9,\n       43.6, 44.5, 43.5, 42.9, 48.9, 52.3, 48. , 55.3, 63.1, 51.2, 44.8,\n       49.1, 58.6, 42.4, 43. , 48.9, 48.2, 56. , 44.5, 43. , 48.1, 46.8,\n       45.3, 42.8, 45.3, 53. , 42.3, 56.1, 52.4, 45.9, 50.8, 43. , 44.8,\n       49. , 55.6, 52.6, 50.6, 53.4, 48.9, 48. , 45.2, 48.2, 52.8, 45. ,\n       50.4, 56.4, 48.4, 48.3, 45. , 56.2, 50.1, 50.8, 43.8, 52.1, 48.7,\n       49.4, 46.1, 44.2, 49.6, 57.6, 45.2, 47.3, 43. , 44.1, 50.2, 45.3,\n       57.3, 48.2, 47.5, 42.9, 45.4, 49.6, 62.6, 50.9, 42.7, 44.4, 49.6,\n       48.6, 50.1, 48.4, 43.9, 53.4, 55.4, 46.6, 53.2, 48.2, 47. , 50.2,\n       47.3, 47.2, 51.7, 46.4, 42.6, 52.6, 46.1, 49.1, 49.3, 54.7, 61.3,\n       50.7, 45.6, 49.6, 47. , 46.7, 56.4, 45.5, 44.5, 46.3, 49.4, 47.4,\n       42.5, 47.7, 54.7, 44.3, 48. , 54.5, 51. , 43.8, 42.3, 47.8, 51. ,\n       49.9, 57.2, 51.7, 52.9, 45.7, 66.7, 46.5, 53.6, 47.5, 60.6, 47.9,\n       53.6, 53.8, 46.3, 44.2, 47.4, 44. , 49.8, 42.6, 48.9, 52.1, 49.3,\n       45.8, 51.9, 43. , 49.4, 44.1, 46.1, 45.7, 45.5, 65. , 45.4, 53. ,\n       55.6, 43.9, 54.2, 50.6, 42.8, 52. , 46. , 42.3, 42.3, 44.4, 45. ,\n       48.5, 44.9, 44.1, 51.8, 42.8, 45.6, 50.8, 52.6, 46.9, 43.8, 48.5,\n       64.1, 46. , 43.8, 50.6, 56.2, 43.1, 47.3, 59.2, 52.8, 44.8, 48.2,\n       45.5, 53.7, 44.8, 49.7, 48.3, 45.8, 42.9, 46.6, 43.7, 47.9, 50.5,\n       42.9, 48. , 52. , 51.1, 43.7, 43.1, 48.9, 48.6, 52.9])"
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "phy[phy > np.mean(phy)]"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.674579Z",
     "end_time": "2024-05-07T18:54:11.732376Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "outputs": [
    {
     "data": {
      "text/plain": "array([-1, -1,  1, -1, -1, -1, -1, -1, -1, -1, -1,  1,  1, -1, -1, -1,  1,\n       -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1, -1, -1, -1, -1, -1,  1,\n       -1, -1,  1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1,  1, -1, -1,  1,\n       -1, -1, -1,  1, -1, -1, -1,  1,  1, -1, -1, -1, -1, -1, -1,  1, -1,\n       -1,  1,  1, -1, -1,  1, -1,  1,  1, -1, -1,  1,  1, -1, -1,  1, -1,\n       -1, -1, -1, -1,  1,  1, -1, -1, -1,  1, -1, -1, -1, -1,  1,  1,  1,\n       -1,  1,  1, -1,  1,  1, -1, -1, -1, -1, -1, -1, -1,  1,  1, -1, -1,\n       -1, -1,  1, -1,  1, -1, -1, -1, -1,  1,  1,  1, -1,  1, -1, -1, -1,\n        1, -1, -1, -1, -1, -1, -1,  1,  1, -1, -1, -1, -1, -1, -1, -1,  1,\n       -1, -1, -1, -1, -1, -1, -1,  1, -1,  1, -1, -1, -1,  1,  1, -1, -1,\n       -1, -1, -1,  1, -1,  1, -1,  1, -1, -1, -1, -1,  1, -1, -1, -1, -1,\n       -1, -1,  1,  1, -1, -1, -1, -1, -1,  1, -1, -1,  1, -1, -1, -1, -1,\n        1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1, -1,  1, -1, -1,\n       -1,  1,  1,  1,  1,  1, -1,  1,  1, -1,  1,  1,  1, -1, -1,  1, -1,\n       -1, -1, -1, -1,  1, -1,  1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1,\n       -1, -1, -1,  1, -1, -1, -1, -1,  1, -1, -1, -1, -1, -1, -1, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1, -1, -1,  1,  1, -1, -1,\n       -1,  1, -1, -1, -1, -1, -1,  1, -1, -1, -1,  1, -1, -1, -1, -1,  1,\n       -1, -1, -1, -1, -1, -1,  1,  1, -1,  1,  1,  1,  1, -1, -1,  1, -1,\n        1, -1,  1, -1, -1,  1, -1, -1, -1, -1, -1,  1, -1, -1,  1,  1, -1,\n       -1, -1,  1, -1, -1, -1,  1, -1,  1, -1,  1, -1, -1, -1, -1, -1, -1,\n        1, -1, -1,  1, -1, -1, -1,  1, -1, -1, -1, -1, -1, -1, -1,  1,  1,\n        1,  1, -1,  1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n       -1,  1,  1,  1, -1,  1,  1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1,\n       -1, -1, -1,  1, -1, -1, -1,  1, -1, -1, -1,  1, -1, -1, -1, -1, -1,\n       -1,  1,  1, -1, -1, -1, -1, -1,  1,  1,  1, -1, -1,  1, -1,  1, -1,\n       -1, -1,  1, -1, -1, -1,  1, -1, -1, -1,  1, -1, -1, -1, -1, -1, -1,\n       -1, -1, -1, -1,  1, -1, -1, -1, -1,  1, -1, -1, -1, -1, -1,  1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1,  1,\n       -1, -1, -1, -1,  1,  1,  1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1,\n       -1, -1, -1,  1, -1, -1, -1, -1, -1, -1, -1,  1, -1,  1, -1, -1,  1,\n       -1, -1, -1, -1, -1, -1,  1, -1, -1,  1, -1, -1, -1,  1, -1, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1,  1, -1,  1, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1,  1,  1, -1,\n       -1, -1, -1, -1, -1, -1,  1,  1,  1, -1, -1,  1, -1, -1, -1,  1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1,  1,  1,  1,  1, -1, -1, -1, -1, -1,\n        1, -1, -1, -1, -1, -1,  1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1,\n       -1, -1, -1,  1, -1,  1, -1, -1,  1, -1,  1, -1, -1,  1, -1, -1, -1,\n       -1, -1, -1, -1, -1,  1, -1,  1, -1, -1, -1,  1,  1,  1, -1,  1, -1,\n       -1,  1, -1, -1, -1, -1, -1, -1,  1,  1, -1, -1, -1,  1, -1, -1,  1,\n       -1,  1,  1,  1, -1, -1, -1, -1, -1, -1,  1, -1,  1, -1,  1, -1, -1,\n       -1,  1,  1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1,  1,\n        1,  1, -1,  1, -1, -1, -1,  1, -1, -1,  1, -1, -1, -1, -1,  1, -1,\n       -1, -1, -1, -1, -1,  1, -1, -1, -1,  1, -1, -1,  1, -1, -1,  1,  1,\n       -1,  1, -1,  1, -1, -1, -1, -1,  1, -1, -1, -1, -1, -1, -1, -1,  1,\n       -1, -1, -1,  1, -1, -1, -1,  1,  1, -1, -1, -1,  1, -1, -1,  1, -1,\n        1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1, -1, -1,  1, -1,  1,  1,\n       -1, -1, -1,  1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1,  1, -1,\n        1, -1, -1, -1,  1, -1, -1,  1, -1, -1,  1, -1, -1,  1, -1,  1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1,  1,  1, -1,  1, -1, -1,  1,  1,\n       -1, -1, -1, -1, -1, -1,  1, -1,  1, -1, -1, -1, -1, -1, -1, -1,  1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1,  1, -1, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1, -1,\n       -1, -1, -1,  1, -1, -1,  1,  1,  1,  1, -1, -1, -1, -1, -1, -1, -1,\n        1,  1, -1,  1, -1, -1,  1,  1, -1, -1,  1, -1, -1,  1, -1,  1, -1,\n       -1, -1, -1,  1, -1,  1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1,\n        1, -1, -1, -1, -1,  1,  1, -1, -1, -1,  1,  1,  1, -1, -1, -1, -1,\n        1,  1, -1, -1,  1, -1, -1,  1, -1, -1, -1,  1, -1, -1])"
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.where(phy > mat, 1, -1)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.696514Z",
     "end_time": "2024-05-07T18:54:11.732376Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "outputs": [
    {
     "data": {
      "text/plain": "(array([  2,   3,   5,   7,   9,  10,  11,  12,  16,  18,  19,  20,  24,\n         29,  30,  32,  33,  34,  36,  38,  39,  40,  45,  46,  47,  48,\n         50,  54,  55,  58,  59,  66,  69,  72,  73,  74,  75,  76,  79,\n         80,  81,  83,  85,  87,  89,  90,  91,  94,  99, 100, 101, 103,\n        104, 106, 107, 110, 111, 115, 116, 117, 118, 121, 122, 123, 128,\n        129, 130, 131, 132, 136, 138, 140, 141, 142, 143, 145, 148, 149,\n        150, 151, 152, 153, 156, 157, 158, 159, 160, 162, 163, 166, 167,\n        172, 175, 177, 180, 182, 183, 187, 188, 189, 190, 191, 192, 196,\n        199, 201, 210, 211, 212, 215, 218, 221, 222, 223, 224, 225, 226,\n        229, 232, 233, 236, 238, 239, 248, 252, 255, 256, 257, 258, 260,\n        262, 263, 264, 268, 278, 279, 284, 285, 286, 287, 290, 293, 295,\n        297, 299, 300, 301, 304, 305, 306, 313, 315, 316, 317, 318, 320,\n        323, 324, 326, 328, 330, 331, 334, 335, 337, 339, 340, 341, 342,\n        343, 346, 347, 348, 349, 351, 353, 357, 359, 360, 363, 364, 369,\n        370, 371, 372, 373, 374, 375, 377, 380, 381, 382, 383, 386, 388,\n        389, 390, 392, 393, 394, 395, 397, 399, 402, 404, 406, 411, 412,\n        414, 415, 416, 418, 419, 421, 423, 425, 426, 427, 428, 430, 431,\n        434, 435, 437, 438, 440, 442, 443, 447, 449, 452, 453, 456, 457,\n        459, 462, 465, 468, 469, 472, 474, 475, 481, 482, 484, 489, 491,\n        492, 497, 498, 499, 500, 501, 508, 510, 512, 513, 516, 517, 521,\n        523, 526, 528, 529, 532, 533, 536, 537, 540, 541, 542, 543, 548,\n        550, 551, 552, 554, 556, 558, 559, 561, 564, 565, 571, 572, 573,\n        575, 576, 577, 578, 579, 581, 584, 585, 586, 589, 591, 593, 597,\n        599, 600, 602, 603, 604, 605, 606, 608, 609, 611, 612, 613, 614,\n        616, 617, 618, 620, 624, 626, 629, 630, 632, 633, 634, 636, 637,\n        639, 640, 642, 643, 647, 651, 653, 655, 656, 658, 659, 660, 661,\n        664, 665, 668, 671, 672, 676, 679, 681, 682, 683, 684, 686, 690,\n        692, 695, 696, 697, 698, 699, 700, 702, 703, 704, 706, 709, 713,\n        714, 715, 716, 717, 719, 724, 725, 726, 733, 736, 739, 740, 741,\n        743, 746, 747, 750, 751, 754, 755, 756, 758, 759, 763, 764, 767,\n        768, 770, 771, 772, 773, 777, 782, 783, 788, 789, 790, 792, 794,\n        795, 796, 797, 798, 799, 801, 802, 805, 809, 810, 814, 815, 816,\n        817, 820, 825, 827, 828, 829, 831, 833, 836, 837, 838, 840, 841,\n        843, 845, 846, 847, 848, 855, 857, 858, 860, 861, 862, 864, 865,\n        873, 875, 876, 878, 880, 882, 883, 889, 894, 897, 898, 900, 901,\n        902, 903, 904, 906, 908, 909, 911, 913, 914, 919, 921, 923, 924,\n        925, 926, 927, 930, 935, 936, 937, 938, 941, 942, 943, 945, 948,\n        950, 954, 955, 956, 957, 958, 960, 963, 965, 967, 974, 975, 978,\n        979, 982, 984, 986, 987, 988, 989, 993, 994, 997], dtype=int64),)"
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.where(phy > phy.mean())"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.704558Z",
     "end_time": "2024-05-07T18:54:11.733889Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [
    {
     "data": {
      "text/plain": "array(['C', 'C', 'B', 'B', 'C', 'B', 'C', 'B', 'C', 'B', 'B', 'B', 'B',\n       'C', 'C', 'C', 'B', 'C', 'B', 'B', 'B', 'C', 'C', 'C', 'B', 'C',\n       'C', 'C', 'C', 'B', 'B', 'C', 'B', 'B', 'B', 'C', 'B', 'C', 'B',\n       'B', 'B', 'C', 'C', 'C', 'C', 'B', 'B', 'B', 'B', 'C', 'B', 'C',\n       'C', 'C', 'B', 'B', 'C', 'C', 'B', 'B', 'C', 'C', 'C', 'C', 'C',\n       'C', 'B', 'C', 'C', 'B', 'C', 'C', 'B', 'B', 'B', 'B', 'B', 'C',\n       'C', 'B', 'B', 'B', 'C', 'B', 'C', 'B', 'C', 'B', 'C', 'B', 'B',\n       'B', 'C', 'C', 'B', 'C', 'C', 'C', 'C', 'B', 'B', 'B', 'C', 'B',\n       'B', 'C', 'B', 'B', 'C', 'C', 'B', 'B', 'C', 'C', 'C', 'B', 'B',\n       'B', 'B', 'C', 'C', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'B', 'B',\n       'B', 'B', 'B', 'C', 'C', 'C', 'B', 'C', 'B', 'C', 'B', 'B', 'B',\n       'B', 'C', 'B', 'C', 'C', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C',\n       'B', 'B', 'B', 'B', 'B', 'C', 'B', 'B', 'C', 'C', 'B', 'B', 'C',\n       'C', 'C', 'C', 'B', 'C', 'C', 'B', 'C', 'A', 'C', 'C', 'B', 'C',\n       'B', 'B', 'C', 'C', 'C', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C',\n       'C', 'B', 'C', 'C', 'A', 'C', 'B', 'C', 'C', 'C', 'C', 'C', 'C',\n       'C', 'C', 'B', 'B', 'B', 'C', 'C', 'B', 'C', 'C', 'B', 'C', 'C',\n       'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'B', 'C', 'C', 'B', 'B',\n       'C', 'C', 'B', 'C', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C',\n       'C', 'B', 'C', 'C', 'C', 'B', 'C', 'C', 'B', 'B', 'B', 'B', 'C',\n       'B', 'C', 'B', 'B', 'B', 'C', 'C', 'C', 'B', 'C', 'C', 'C', 'C',\n       'C', 'C', 'C', 'C', 'C', 'B', 'B', 'C', 'C', 'C', 'C', 'B', 'B',\n       'B', 'B', 'C', 'C', 'B', 'C', 'C', 'B', 'C', 'B', 'C', 'B', 'C',\n       'B', 'B', 'B', 'C', 'C', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C',\n       'C', 'B', 'C', 'B', 'B', 'B', 'B', 'C', 'B', 'C', 'C', 'B', 'B',\n       'C', 'B', 'C', 'B', 'C', 'B', 'B', 'C', 'C', 'B', 'B', 'C', 'B',\n       'C', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'B', 'B', 'B', 'B', 'C',\n       'B', 'C', 'B', 'C', 'C', 'C', 'B', 'C', 'B', 'B', 'C', 'C', 'B',\n       'B', 'C', 'C', 'C', 'C', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C',\n       'B', 'C', 'C', 'B', 'B', 'B', 'B', 'C', 'C', 'B', 'C', 'B', 'B',\n       'B', 'C', 'B', 'B', 'B', 'B', 'C', 'B', 'C', 'B', 'C', 'C', 'B',\n       'C', 'B', 'C', 'B', 'C', 'C', 'C', 'C', 'B', 'B', 'C', 'B', 'B',\n       'B', 'C', 'B', 'B', 'C', 'B', 'C', 'B', 'C', 'B', 'B', 'B', 'B',\n       'C', 'B', 'B', 'C', 'C', 'B', 'B', 'C', 'B', 'B', 'C', 'B', 'C',\n       'B', 'B', 'C', 'C', 'C', 'B', 'C', 'B', 'C', 'C', 'B', 'B', 'C',\n       'C', 'B', 'B', 'C', 'B', 'C', 'C', 'B', 'C', 'C', 'B', 'C', 'C',\n       'B', 'B', 'C', 'C', 'B', 'C', 'B', 'B', 'C', 'C', 'C', 'C', 'C',\n       'B', 'B', 'C', 'B', 'C', 'C', 'C', 'C', 'B', 'C', 'B', 'B', 'C',\n       'C', 'C', 'C', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C',\n       'C', 'B', 'C', 'B', 'C', 'B', 'B', 'C', 'C', 'B', 'B', 'C', 'C',\n       'C', 'B', 'C', 'B', 'C', 'C', 'B', 'C', 'B', 'B', 'C', 'C', 'B',\n       'B', 'C', 'C', 'B', 'B', 'C', 'C', 'B', 'B', 'B', 'B', 'C', 'C',\n       'C', 'C', 'B', 'C', 'B', 'B', 'B', 'C', 'B', 'C', 'B', 'C', 'B',\n       'B', 'C', 'B', 'C', 'C', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'B',\n       'B', 'B', 'C', 'B', 'B', 'B', 'B', 'B', 'C', 'B', 'C', 'C', 'B',\n       'B', 'B', 'C', 'C', 'B', 'C', 'B', 'C', 'B', 'C', 'C', 'C', 'B',\n       'C', 'B', 'B', 'C', 'B', 'B', 'B', 'B', 'A', 'C', 'B', 'B', 'C',\n       'B', 'B', 'B', 'B', 'C', 'B', 'B', 'B', 'C', 'B', 'C', 'C', 'C',\n       'B', 'C', 'B', 'C', 'C', 'B', 'B', 'C', 'B', 'B', 'B', 'C', 'B',\n       'B', 'C', 'B', 'B', 'C', 'B', 'B', 'C', 'C', 'C', 'B', 'C', 'C',\n       'C', 'B', 'C', 'B', 'C', 'B', 'B', 'C', 'B', 'B', 'B', 'B', 'C',\n       'C', 'B', 'B', 'C', 'C', 'B', 'C', 'C', 'B', 'B', 'C', 'C', 'C',\n       'B', 'C', 'C', 'B', 'C', 'B', 'B', 'B', 'B', 'C', 'B', 'C', 'C',\n       'C', 'B', 'C', 'B', 'C', 'C', 'B', 'B', 'B', 'B', 'B', 'B', 'C',\n       'B', 'B', 'B', 'C', 'B', 'C', 'C', 'B', 'C', 'C', 'C', 'B', 'B',\n       'B', 'B', 'B', 'C', 'B', 'C', 'C', 'C', 'C', 'A', 'B', 'B', 'C',\n       'C', 'C', 'C', 'C', 'C', 'B', 'C', 'C', 'B', 'C', 'C', 'B', 'B',\n       'B', 'C', 'B', 'C', 'C', 'B', 'B', 'C', 'C', 'B', 'B', 'C', 'C',\n       'B', 'B', 'B', 'C', 'B', 'B', 'C', 'C', 'C', 'B', 'B', 'C', 'C',\n       'B', 'B', 'C', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'B', 'C', 'C',\n       'C', 'C', 'B', 'B', 'C', 'C', 'C', 'C', 'B', 'B', 'B', 'C', 'B',\n       'C', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'B', 'B', 'C', 'C', 'B',\n       'C', 'C', 'C', 'B', 'B', 'C', 'C', 'C', 'B', 'B', 'B', 'B', 'C',\n       'C', 'B', 'C', 'C', 'C', 'C', 'B', 'C', 'B', 'B', 'B', 'C', 'B',\n       'C', 'A', 'C', 'C', 'B', 'B', 'B', 'C', 'B', 'B', 'C', 'B', 'C',\n       'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'B', 'C', 'B',\n       'B', 'C', 'B', 'B', 'B', 'C', 'B', 'B', 'C', 'C', 'C', 'C', 'C',\n       'C', 'C', 'B', 'C', 'B', 'B', 'C', 'B', 'C', 'B', 'C', 'B', 'A',\n       'C', 'C', 'C', 'C', 'C', 'B', 'C', 'C', 'C', 'C', 'B', 'C', 'C',\n       'B', 'B', 'C', 'B', 'B', 'B', 'B', 'B', 'C', 'B', 'C', 'B', 'B',\n       'C', 'B', 'C', 'B', 'B', 'C', 'C', 'C', 'C', 'B', 'C', 'B', 'C',\n       'B', 'B', 'B', 'B', 'B', 'C', 'C', 'B', 'C', 'C', 'C', 'C', 'B',\n       'A', 'B', 'B', 'C', 'C', 'B', 'B', 'B', 'C', 'B', 'C', 'C', 'B',\n       'C', 'B', 'C', 'C', 'C', 'B', 'B', 'B', 'B', 'B', 'C', 'B', 'C',\n       'C', 'B', 'C', 'B', 'C', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'B',\n       'B', 'C', 'C', 'B', 'B', 'C', 'C', 'B', 'C', 'B', 'C', 'B', 'B',\n       'B', 'B', 'C', 'C', 'C', 'B', 'B', 'C', 'C', 'B', 'C', 'C'],\n      dtype='<U1')"
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "grand_a = np.mean(phy) + 20\n",
    "grand_b = np.mean(phy)\n",
    "np.select([phy >= grand_a, np.logical_and(phy >= grand_b, phy < grand_a)], ['A', 'B'], default='C')"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.727956Z",
     "end_time": "2024-05-07T18:54:11.777190Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [
    {
     "data": {
      "text/plain": "array([  0.,   0.,  60.,  60.,   0.,  60.,   0.,  60.,   0.,  60.,  60.,\n        60.,  60.,   0.,   0.,   0.,  60.,   0.,  60.,  60.,  60.,   0.,\n         0.,   0.,  60.,   0.,   0.,   0.,   0.,  60.,  60.,   0.,  60.,\n        60.,  60.,   0.,  60.,   0.,  60.,  60.,  60.,   0.,   0.,   0.,\n         0.,  60.,  60.,  60.,  60.,   0.,  60.,   0.,   0.,   0.,  60.,\n        60.,   0.,   0.,  60.,  60.,   0.,   0.,   0.,   0.,   0.,   0.,\n        60.,   0.,   0.,  60.,   0.,   0.,  60.,  60.,  60.,  60.,  60.,\n         0.,   0.,  60.,  60.,  60.,   0.,  60.,   0.,  60.,   0.,  60.,\n         0.,  60.,  60.,  60.,   0.,   0.,  60.,   0.,   0.,   0.,   0.,\n        60.,  60.,  60.,   0.,  60.,  60.,   0.,  60.,  60.,   0.,   0.,\n        60.,  60.,   0.,   0.,   0.,  60.,  60.,  60.,  60.,   0.,   0.,\n        60.,  60.,  60.,   0.,   0.,   0.,   0.,  60.,  60.,  60.,  60.,\n        60.,   0.,   0.,   0.,  60.,   0.,  60.,   0.,  60.,  60.,  60.,\n        60.,   0.,  60.,   0.,   0.,  60.,  60.,  60.,  60.,  60.,  60.,\n         0.,   0.,  60.,  60.,  60.,  60.,  60.,   0.,  60.,  60.,   0.,\n         0.,  60.,  60.,   0.,   0.,   0.,   0.,  60.,   0.,   0.,  60.,\n         0., 100.,   0.,   0.,  60.,   0.,  60.,  60.,   0.,   0.,   0.,\n        60.,  60.,  60.,  60.,  60.,  60.,   0.,   0.,   0.,  60.,   0.,\n         0., 100.,   0.,  60.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,\n         0.,  60.,  60.,  60.,   0.,   0.,  60.,   0.,   0.,  60.,   0.,\n         0.,  60.,  60.,  60.,  60.,  60.,  60.,   0.,   0.,  60.,   0.,\n         0.,  60.,  60.,   0.,   0.,  60.,   0.,  60.,  60.,   0.,   0.,\n         0.,   0.,   0.,   0.,   0.,   0.,  60.,   0.,   0.,   0.,  60.,\n         0.,   0.,  60.,  60.,  60.,  60.,   0.,  60.,   0.,  60.,  60.,\n        60.,   0.,   0.,   0.,  60.,   0.,   0.,   0.,   0.,   0.,   0.,\n         0.,   0.,   0.,  60.,  60.,   0.,   0.,   0.,   0.,  60.,  60.,\n        60.,  60.,   0.,   0.,  60.,   0.,   0.,  60.,   0.,  60.,   0.,\n        60.,   0.,  60.,  60.,  60.,   0.,   0.,  60.,  60.,  60.,   0.,\n         0.,   0.,   0.,   0.,   0.,  60.,   0.,  60.,  60.,  60.,  60.,\n         0.,  60.,   0.,   0.,  60.,  60.,   0.,  60.,   0.,  60.,   0.,\n        60.,  60.,   0.,   0.,  60.,  60.,   0.,  60.,   0.,  60.,  60.,\n        60.,  60.,  60.,   0.,   0.,  60.,  60.,  60.,  60.,   0.,  60.,\n         0.,  60.,   0.,   0.,   0.,  60.,   0.,  60.,  60.,   0.,   0.,\n        60.,  60.,   0.,   0.,   0.,   0.,  60.,  60.,  60.,  60.,  60.,\n        60.,  60.,   0.,  60.,   0.,   0.,  60.,  60.,  60.,  60.,   0.,\n         0.,  60.,   0.,  60.,  60.,  60.,   0.,  60.,  60.,  60.,  60.,\n         0.,  60.,   0.,  60.,   0.,   0.,  60.,   0.,  60.,   0.,  60.,\n         0.,   0.,   0.,   0.,  60.,  60.,   0.,  60.,  60.,  60.,   0.,\n        60.,  60.,   0.,  60.,   0.,  60.,   0.,  60.,  60.,  60.,  60.,\n         0.,  60.,  60.,   0.,   0.,  60.,  60.,   0.,  60.,  60.,   0.,\n        60.,   0.,  60.,  60.,   0.,   0.,   0.,  60.,   0.,  60.,   0.,\n         0.,  60.,  60.,   0.,   0.,  60.,  60.,   0.,  60.,   0.,   0.,\n        60.,   0.,   0.,  60.,   0.,   0.,  60.,  60.,   0.,   0.,  60.,\n         0.,  60.,  60.,   0.,   0.,   0.,   0.,   0.,  60.,  60.,   0.,\n        60.,   0.,   0.,   0.,   0.,  60.,   0.,  60.,  60.,   0.,   0.,\n         0.,   0.,  60.,  60.,  60.,  60.,  60.,   0.,   0.,   0.,   0.,\n         0.,   0.,  60.,   0.,  60.,   0.,  60.,  60.,   0.,   0.,  60.,\n        60.,   0.,   0.,   0.,  60.,   0.,  60.,   0.,   0.,  60.,   0.,\n        60.,  60.,   0.,   0.,  60.,  60.,   0.,   0.,  60.,  60.,   0.,\n         0.,  60.,  60.,  60.,  60.,   0.,   0.,   0.,   0.,  60.,   0.,\n        60.,  60.,  60.,   0.,  60.,   0.,  60.,   0.,  60.,  60.,   0.,\n        60.,   0.,   0.,  60.,  60.,   0.,   0.,   0.,   0.,   0.,  60.,\n        60.,  60.,   0.,  60.,  60.,  60.,  60.,  60.,   0.,  60.,   0.,\n         0.,  60.,  60.,  60.,   0.,   0.,  60.,   0.,  60.,   0.,  60.,\n         0.,   0.,   0.,  60.,   0.,  60.,  60.,   0.,  60.,  60.,  60.,\n        60., 100.,   0.,  60.,  60.,   0.,  60.,  60.,  60.,  60.,   0.,\n        60.,  60.,  60.,   0.,  60.,   0.,   0.,   0.,  60.,   0.,  60.,\n         0.,   0.,  60.,  60.,   0.,  60.,  60.,  60.,   0.,  60.,  60.,\n         0.,  60.,  60.,   0.,  60.,  60.,   0.,   0.,   0.,  60.,   0.,\n         0.,   0.,  60.,   0.,  60.,   0.,  60.,  60.,   0.,  60.,  60.,\n        60.,  60.,   0.,   0.,  60.,  60.,   0.,   0.,  60.,   0.,   0.,\n        60.,  60.,   0.,   0.,   0.,  60.,   0.,   0.,  60.,   0.,  60.,\n        60.,  60.,  60.,   0.,  60.,   0.,   0.,   0.,  60.,   0.,  60.,\n         0.,   0.,  60.,  60.,  60.,  60.,  60.,  60.,   0.,  60.,  60.,\n        60.,   0.,  60.,   0.,   0.,  60.,   0.,   0.,   0.,  60.,  60.,\n        60.,  60.,  60.,   0.,  60.,   0.,   0.,   0.,   0., 100.,  60.,\n        60.,   0.,   0.,   0.,   0.,   0.,   0.,  60.,   0.,   0.,  60.,\n         0.,   0.,  60.,  60.,  60.,   0.,  60.,   0.,   0.,  60.,  60.,\n         0.,   0.,  60.,  60.,   0.,   0.,  60.,  60.,  60.,   0.,  60.,\n        60.,   0.,   0.,   0.,  60.,  60.,   0.,   0.,  60.,  60.,   0.,\n        60.,  60.,  60.,  60.,   0.,   0.,   0.,  60.,   0.,   0.,   0.,\n         0.,  60.,  60.,   0.,   0.,   0.,   0.,  60.,  60.,  60.,   0.,\n        60.,   0.,  60.,  60.,  60.,  60.,  60.,  60.,   0.,  60.,  60.,\n         0.,   0.,  60.,   0.,   0.,   0.,  60.,  60.,   0.,   0.,   0.,\n        60.,  60.,  60.,  60.,   0.,   0.,  60.,   0.,   0.,   0.,   0.,\n        60.,   0.,  60.,  60.,  60.,   0.,  60.,   0., 100.,   0.,   0.,\n        60.,  60.,  60.,   0.,  60.,  60.,   0.,  60.,   0.,  60.,  60.,\n        60.,  60.,   0.,   0.,   0.,   0.,   0.,   0.,  60.,   0.,  60.,\n        60.,   0.,  60.,  60.,  60.,   0.,  60.,  60.,   0.,   0.,   0.,\n         0.,   0.,   0.,   0.,  60.,   0.,  60.,  60.,   0.,  60.,   0.,\n        60.,   0.,  60., 100.,   0.,   0.,   0.,   0.,   0.,  60.,   0.,\n         0.,   0.,   0.,  60.,   0.,   0.,  60.,  60.,   0.,  60.,  60.,\n        60.,  60.,  60.,   0.,  60.,   0.,  60.,  60.,   0.,  60.,   0.,\n        60.,  60.,   0.,   0.,   0.,   0.,  60.,   0.,  60.,   0.,  60.,\n        60.,  60.,  60.,  60.,   0.,   0.,  60.,   0.,   0.,   0.,   0.,\n        60., 100.,  60.,  60.,   0.,   0.,  60.,  60.,  60.,   0.,  60.,\n         0.,   0.,  60.,   0.,  60.,   0.,   0.,   0.,  60.,  60.,  60.,\n        60.,  60.,   0.,  60.,   0.,   0.,  60.,   0.,  60.,   0.,  60.,\n         0.,   0.,   0.,   0.,   0.,   0.,  60.,  60.,   0.,   0.,  60.,\n        60.,   0.,   0.,  60.,   0.,  60.,   0.,  60.,  60.,  60.,  60.,\n         0.,   0.,   0.,  60.,  60.,   0.,   0.,  60.,   0.,   0.])"
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.piecewise(phy, [phy > grand_a, np.logical_and(phy >= grand_b, phy < grand_a)], [100, 60])"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.753456Z",
     "end_time": "2024-05-07T18:54:11.809085Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:54:11.777190Z",
     "end_time": "2024-05-07T18:54:11.825311Z"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
